Replace "gchar" with "char"

This commit is contained in:
Benjamin Otte 2020-07-24 20:40:36 +02:00
parent d7266b25ba
commit d375dce9f5
667 changed files with 4963 additions and 4963 deletions

View File

@ -82,7 +82,7 @@ static void
constraint_editor_application_open (GApplication *app,
GFile **files,
int n_files,
const gchar *hint)
const char *hint)
{
ConstraintEditorWindow *win;
int i;

View File

@ -34,7 +34,7 @@ static void create_window (GApplication *app, const char *contents);
static void
show_action_dialog (GSimpleAction *action)
{
const gchar *name;
const char *name;
GtkWidget *dialog;
name = g_action_get_name (G_ACTION (action));
@ -58,9 +58,9 @@ show_action_infobar (GSimpleAction *action,
gpointer data)
{
DemoApplicationWindow *window = data;
gchar *text;
const gchar *name;
const gchar *value;
char *text;
const char *name;
const char *value;
name = g_action_get_name (G_ACTION (action));
value = g_variant_get_string (parameter, NULL);
@ -185,7 +185,7 @@ activate_about (GSimpleAction *action,
{
GtkWidget *window = user_data;
const gchar *authors[] = {
const char *authors[] = {
"Peter Mattis",
"Spencer Kimball",
"Josh MacDonald",
@ -193,7 +193,7 @@ activate_about (GSimpleAction *action,
NULL
};
const gchar *documentors[] = {
const char *documentors[] = {
"Owen Taylor",
"Tony Gale",
"Matthias Clasen <mclasen@redhat.com>",
@ -244,7 +244,7 @@ static void
update_statusbar (GtkTextBuffer *buffer,
DemoApplicationWindow *window)
{
gchar *msg;
char *msg;
int row, col;
int count;
GtkTextIter iter;

View File

@ -16,8 +16,8 @@ static GtkWidget *placeholder;
static void
on_name_appeared (GDBusConnection *connection,
const gchar *name,
const gchar *name_owner,
const char *name,
const char *name_owner,
gpointer user_data)
{
name_seen = TRUE;
@ -25,7 +25,7 @@ on_name_appeared (GDBusConnection *connection,
static void
on_name_vanished (GDBusConnection *connection,
const gchar *name,
const char *name,
gpointer user_data)
{
if (!name_seen)
@ -55,7 +55,7 @@ do_application_demo (GtkWidget *toplevel)
if (placeholder == NULL)
{
const gchar *command;
const char *command;
GError *error = NULL;
if (g_file_test ("./gtk4-demo-application" APP_EXTENSION, G_FILE_TEST_IS_EXECUTABLE))

View File

@ -48,7 +48,7 @@ static void
on_assistant_prepare (GtkWidget *widget, GtkWidget *page, gpointer data)
{
int current_page, n_pages;
gchar *title;
char *title;
current_page = gtk_assistant_get_current_page (GTK_ASSISTANT (widget));
n_pages = gtk_assistant_get_n_pages (GTK_ASSISTANT (widget));
@ -71,7 +71,7 @@ on_entry_changed (GtkWidget *widget, gpointer data)
GtkAssistant *assistant = GTK_ASSISTANT (data);
GtkWidget *current_page;
int page_number;
const gchar *text;
const char *text;
page_number = gtk_assistant_get_current_page (assistant);
current_page = gtk_assistant_get_nth_page (assistant, page_number);

View File

@ -38,14 +38,14 @@ struct {
#pragma GCC diagnostic ignored "-Wformat-nonliteral"
static void
update_css_for_blend_mode (GtkCssProvider *provider,
const gchar *blend_mode)
const char *blend_mode)
{
GBytes *bytes;
gchar *css;
char *css;
bytes = g_resources_lookup_data ("/css_blendmodes/css_blendmodes.css", 0, NULL);
css = g_strdup_printf ((gchar*) g_bytes_get_data (bytes, NULL),
css = g_strdup_printf ((char *) g_bytes_get_data (bytes, NULL),
blend_mode,
blend_mode,
blend_mode);
@ -62,7 +62,7 @@ row_activated (GtkListBox *listbox,
GtkListBoxRow *row,
GtkCssProvider *provider)
{
const gchar *blend_mode;
const char *blend_mode;
blend_mode = blend_modes[gtk_list_box_row_get_index (row)].id;

View File

@ -17,7 +17,7 @@ G_DEFINE_TYPE(DemoImage, demo_image, GTK_TYPE_WIDGET)
static GdkPaintable *
get_image_paintable (GtkImage *image)
{
const gchar *icon_name;
const char *icon_name;
GtkIconTheme *icon_theme;
GtkIconPaintable *icon;

View File

@ -17,7 +17,7 @@
typedef struct
{
int number;
gchar *product;
char *product;
int yummy;
}
Item;
@ -224,7 +224,7 @@ separator_row (GtkTreeModel *model,
static void
editing_started (GtkCellRenderer *cell,
GtkCellEditable *editable,
const gchar *path,
const char *path,
gpointer data)
{
gtk_combo_box_set_row_separator_func (GTK_COMBO_BOX (editable),
@ -233,8 +233,8 @@ editing_started (GtkCellRenderer *cell,
static void
cell_edited (GtkCellRendererText *cell,
const gchar *path_string,
const gchar *new_text,
const char *path_string,
const char *new_text,
gpointer data)
{
GtkTreeModel *model = (GtkTreeModel *)data;
@ -262,7 +262,7 @@ cell_edited (GtkCellRendererText *cell,
case COLUMN_ITEM_PRODUCT:
{
int i;
gchar *old_text;
char *old_text;
gtk_tree_model_get (model, &iter, column, &old_text, -1);
g_free (old_text);

View File

@ -23,7 +23,7 @@ format_number (GtkTreeViewColumn *col,
gpointer data)
{
int num;
gchar *text;
char *text;
gtk_tree_model_get (model, iter, GPOINTER_TO_INT (data), &num, -1);
text = g_strdup_printf ("%d", num);

View File

@ -29,7 +29,7 @@ draw_color (GtkDrawingArea *drawingarea,
}
static GtkWidget *
color_swatch_new (const gchar *color)
color_swatch_new (const char *color)
{
GtkWidget *button, *area;
@ -48,7 +48,7 @@ do_flowbox (GtkWidget *do_widget)
{
static GtkWidget *window = NULL;
GtkWidget *scrolled, *flowbox;
const gchar *colors[] = {
const char *colors[] = {
"AliceBlue",
"AntiqueWhite",
"AntiqueWhite1",

View File

@ -729,7 +729,7 @@ entry_activated (GtkEntry *entry,
GtkAdjustment *adjustment)
{
gdouble value;
gchar *err = NULL;
char *err = NULL;
value = g_strtod (gtk_editable_get_text (GTK_EDITABLE (entry)), &err);
if (err != NULL)

View File

@ -25,7 +25,7 @@ enum
static GdkPixbuf *file_pixbuf, *folder_pixbuf;
gchar *parent;
char *parent;
GtkWidget *up_button;
/* Loads the images for the demo and returns whether the operation succeeded */
@ -47,7 +47,7 @@ static void
fill_store (GtkListStore *store)
{
GDir *dir;
const gchar *name;
const char *name;
GtkTreeIter iter;
/* First clear the store */
@ -62,7 +62,7 @@ fill_store (GtkListStore *store)
name = g_dir_read_name (dir);
while (name != NULL)
{
gchar *path, *display_name;
char *path, *display_name;
gboolean is_dir;
/* We ignore hidden files that start with a '.' */
@ -97,7 +97,7 @@ sort_func (GtkTreeModel *model,
gpointer user_data)
{
gboolean is_dir_a, is_dir_b;
gchar *name_a, *name_b;
char *name_a, *name_b;
int ret;
/* We need this function because we want to sort
@ -158,7 +158,7 @@ item_activated (GtkIconView *icon_view,
gpointer user_data)
{
GtkListStore *store;
gchar *path;
char *path;
GtkTreeIter iter;
gboolean is_dir;
@ -192,7 +192,7 @@ up_clicked (GtkButton *item,
gpointer user_data)
{
GtkListStore *store;
gchar *dir_name;
char *dir_name;
store = GTK_LIST_STORE (user_data);

View File

@ -19,7 +19,7 @@ static void
fill_store (GtkListStore *store)
{
GtkTreeIter iter;
const gchar *text[] = { "Red", "Green", "Blue", "Yellow" };
const char *text[] = { "Red", "Green", "Blue", "Yellow" };
int i;
/* First clear the store */
@ -49,7 +49,7 @@ set_cell_color (GtkCellLayout *cell_layout,
GtkTreeIter *iter,
gpointer data)
{
gchar *text;
char *text;
GdkRGBA color;
guint32 pixel = 0;
GdkPixbuf *pixbuf;
@ -77,8 +77,8 @@ set_cell_color (GtkCellLayout *cell_layout,
static void
edited (GtkCellRendererText *cell,
gchar *path_string,
gchar *text,
char *path_string,
char *text,
gpointer data)
{
GtkTreeModel *model;

View File

@ -17,7 +17,7 @@ response_cb (GtkWidget *dialog,
static gboolean
activate_link (GtkWidget *label,
const gchar *uri,
const char *uri,
gpointer data)
{
if (g_strcmp0 (uri, "keynav") == 0)

View File

@ -13,7 +13,7 @@
static GtkWidget *info_view;
static GtkWidget *source_view;
static gchar *current_file = NULL;
static char *current_file = NULL;
static GtkWidget *notebook;
static GtkSingleSelection *selection;
@ -141,7 +141,7 @@ activate_about (GSimpleAction *action,
gpointer user_data)
{
GtkApplication *app = user_data;
const gchar *authors[] = {
const char *authors[] = {
"The GTK Team",
NULL
};
@ -254,7 +254,7 @@ static const char *types[] =
"void",
" int ",
" char ",
"gchar ",
"char ",
"gfloat",
"float",
"double",
@ -384,14 +384,14 @@ static const char *control[] =
NULL
};
void
parse_chars (gchar *text,
gchar **end_ptr,
parse_chars (char *text,
char **end_ptr,
int *state,
const char **tag,
gboolean start)
{
int i;
gchar *next_token;
char *next_token;
/* Handle comments first */
if (*state == STATE_IN_COMMENT)
@ -525,8 +525,8 @@ fontify (GtkTextBuffer *source_buffer)
{
GtkTextIter start_iter, next_iter, tmp_iter;
int state;
gchar *text;
gchar *start_ptr, *end_ptr;
char *text;
char *start_ptr, *end_ptr;
const char *tag;
gtk_text_buffer_create_tag (source_buffer, "source",
@ -694,10 +694,10 @@ static struct {
};
static void
add_data_tab (const gchar *demoname)
add_data_tab (const char *demoname)
{
gchar *resource_dir, *resource_name;
gchar **resources;
char *resource_dir, *resource_name;
char **resources;
GtkWidget *widget, *label;
guint i, j;
@ -748,8 +748,8 @@ remove_data_tabs (void)
}
void
load_file (const gchar *demoname,
const gchar *filename)
load_file (const char *demoname,
const char *filename)
{
GtkTextBuffer *info_buffer, *source_buffer;
GtkTextIter start, end;
@ -757,7 +757,7 @@ load_file (const gchar *demoname,
GError *err = NULL;
int state = 0;
gboolean in_para = 0;
gchar **lines;
char **lines;
GBytes *bytes;
int i;
@ -799,9 +799,9 @@ load_file (const gchar *demoname,
gtk_text_buffer_get_iter_at_offset (info_buffer, &start, 0);
for (i = 0; lines[i] != NULL; i++)
{
gchar *p;
gchar *q;
gchar *r;
char *p;
char *q;
char *r;
/* Make sure \r is stripped at the end for the poor windows people */
lines[i] = g_strchomp (lines[i]);
@ -1194,7 +1194,7 @@ command_line (GApplication *app,
GApplicationCommandLine *cmdline)
{
GVariantDict *options;
const gchar *name = NULL;
const char *name = NULL;
gboolean autoquit = FALSE;
gboolean list = FALSE;
DemoData *d, *c;
@ -1297,8 +1297,8 @@ main (int argc, char **argv)
{ "inspector", activate_inspector, NULL, NULL, NULL },
};
struct {
const gchar *action_and_target;
const gchar *accelerators[2];
const char *action_and_target;
const char *accelerators[2];
} accels[] = {
{ "app.about", { "F1", NULL } },
{ "app.quit", { "<Control>q", NULL } },

View File

@ -21,7 +21,7 @@ source_toggled (GtkToggleButton *button)
{
GtkTextBuffer *buffer;
GtkTextIter start, end;
gchar *markup;
char *markup;
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view2));
gtk_text_buffer_get_bounds (buffer, &start, &end);
@ -50,7 +50,7 @@ do_markup (GtkWidget *do_widget)
GtkTextBuffer *buffer;
GtkTextIter iter;
GBytes *bytes;
const gchar *markup;
const char *markup;
GtkWidget *header;
GtkWidget *show_source;
@ -102,7 +102,7 @@ do_markup (GtkWidget *do_widget)
gtk_stack_add_named (GTK_STACK (stack), sw, "source");
bytes = g_resources_lookup_data ("/markup/markup.txt", 0, NULL);
markup = (const gchar *)g_bytes_get_data (bytes, NULL);
markup = (const char *)g_bytes_get_data (bytes, NULL);
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (view));
gtk_text_buffer_get_start_iter (buffer, &iter);

View File

@ -38,7 +38,7 @@ static GtkPadActionEntry pad_actions[] = {
{ GTK_PAD_ACTION_STRIP, -1, -1, N_("Brush size"), "pad.brush_size" },
};
static const gchar *pad_colors[] = {
static const char *pad_colors[] = {
"black",
"pink",
"green",
@ -154,7 +154,7 @@ on_pad_button_activate (GSimpleAction *action,
GVariant *parameter,
DrawingArea *area)
{
const gchar *color = g_object_get_data (G_OBJECT (action), "color");
const char *color = g_object_get_data (G_OBJECT (action), "color");
GdkRGBA rgba;
gdk_rgba_parse (&rgba, color);

View File

@ -47,9 +47,9 @@ toggle_shrink (GtkWidget *widget,
static GtkWidget *
create_pane_options (GtkPaned *paned,
const gchar *frame_label,
const gchar *label1,
const gchar *label2)
const char *frame_label,
const char *label1,
const char *label2)
{
GtkWidget *child1, *child2;
GtkWidget *frame;

View File

@ -14,11 +14,11 @@
typedef struct
{
gchar *resourcename;
char *resourcename;
gdouble font_size;
int lines_per_page;
gchar **lines;
char **lines;
int num_lines;
int num_pages;
} PrintData;
@ -65,7 +65,7 @@ draw_page (GtkPrintOperation *operation,
gdouble width;
int line, i;
PangoFontDescription *desc;
gchar *page_str;
char *page_str;
cr = gtk_print_context_get_cairo_context (context);
width = gtk_print_context_get_width (context);

View File

@ -25,7 +25,7 @@ static gboolean
reveal_one (gpointer data)
{
GtkWidget *window = data;
gchar *name;
char *name;
GtkRevealer *revealer;
name = g_strdup_printf ("revealer%d", count);

View File

@ -8,12 +8,12 @@
static void
show_shortcuts (GtkWidget *window,
const gchar *id,
const gchar *view)
const char *id,
const char *view)
{
GtkBuilder *builder;
GtkWidget *overlay;
gchar *path;
char *path;
path = g_strdup_printf ("/shortcuts/%s.ui", id);
builder = gtk_builder_new_from_resource (path);

View File

@ -18,7 +18,7 @@ do_sidebar (GtkWidget *do_widget)
GtkWidget *box;
GtkWidget *widget;
GtkWidget *header;
const gchar* pages[] = {
const char * pages[] = {
"Welcome to GTK",
"GtkStackSidebar Widget",
"Automatic navigation",
@ -30,7 +30,7 @@ do_sidebar (GtkWidget *do_widget)
"Page 9",
NULL
};
const gchar *c = NULL;
const char *c = NULL;
guint i;
if (!window)

View File

@ -15,8 +15,8 @@ int
spinbutton_hex_spin_input (GtkSpinButton *spin_button,
gdouble *new_val)
{
const gchar *buf;
gchar *err;
const char *buf;
char *err;
gdouble res;
buf = gtk_editable_get_text (GTK_EDITABLE (spin_button));
@ -32,7 +32,7 @@ int
spinbutton_hex_spin_output (GtkSpinButton *spin_button)
{
GtkAdjustment *adjustment;
gchar *buf;
char *buf;
gdouble val;
adjustment = gtk_spin_button_get_adjustment (spin_button);
@ -52,13 +52,13 @@ int
spinbutton_time_spin_input (GtkSpinButton *spin_button,
gdouble *new_val)
{
const gchar *text;
gchar **str;
const char *text;
char **str;
gboolean found = FALSE;
int hours;
int minutes;
gchar *endh;
gchar *endm;
char *endh;
char *endm;
text = gtk_editable_get_text (GTK_EDITABLE (spin_button));
str = g_strsplit (text, ":", 2);
@ -91,7 +91,7 @@ int
spinbutton_time_spin_output (GtkSpinButton *spin_button)
{
GtkAdjustment *adjustment;
gchar *buf;
char *buf;
gdouble hours;
gdouble minutes;
@ -126,7 +126,7 @@ spinbutton_month_spin_input (GtkSpinButton *spin_button,
gdouble *new_val)
{
int i;
gchar *tmp1, *tmp2;
char *tmp1, *tmp2;
gboolean found = FALSE;
for (i = 1; i <= 12; i++)

View File

@ -14,7 +14,7 @@
typedef struct _TreeItem TreeItem;
struct _TreeItem
{
const gchar *label;
const char *label;
gboolean alex;
gboolean havoc;
gboolean tim;
@ -222,7 +222,7 @@ create_model (void)
static void
item_toggled (GtkCellRendererToggle *cell,
gchar *path_str,
char *path_str,
gpointer data)
{
GtkTreeModel *model = (GtkTreeModel *)data;

View File

@ -43,7 +43,7 @@ about_activated (GSimpleAction *action,
gpointer user_data)
{
GtkApplication *app = user_data;
const gchar *authors[] = {
const char *authors[] = {
"The GTK Team",
NULL
};
@ -103,7 +103,7 @@ static GActionEntry app_entries[] =
static void
icon_browser_app_startup (GApplication *app)
{
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
G_APPLICATION_CLASS (icon_browser_app_parent_class)->startup (app);

View File

@ -44,13 +44,13 @@ icon_browser_window_get_icon_theme (IconBrowserWindow *win)
static void
add_icon (IconBrowserWindow *win,
const gchar *name,
const gchar *description,
const gchar *context)
const char *name,
const char *description,
const char *context)
{
GtkIconTheme *icon_theme = icon_browser_window_get_icon_theme (win);
gchar *regular_name;
gchar *symbolic_name;
char *regular_name;
char *symbolic_name;
IbIcon *icon;
regular_name = g_strdup (name);
@ -77,9 +77,9 @@ add_icon (IconBrowserWindow *win,
static void
add_context (IconBrowserWindow *win,
const gchar *id,
const gchar *name,
const gchar *description)
const char *id,
const char *name,
const char *description)
{
IbContext *context;
@ -161,7 +161,7 @@ copy_to_clipboard (GtkButton *button,
}
static void
set_image (GtkWidget *image, const gchar *name, int size)
set_image (GtkWidget *image, const char *name, int size)
{
gtk_image_set_from_icon_name (GTK_IMAGE (image), name);
gtk_image_set_pixel_size (GTK_IMAGE (image), size);
@ -219,7 +219,7 @@ item_activated (GtkGridView *view,
static GdkPaintable *
get_image_paintable (GtkImage *image)
{
const gchar *icon_name;
const char *icon_name;
GtkIconTheme *icon_theme;
GtkIconPaintable *icon;
int size;

View File

@ -200,7 +200,7 @@ static void
node_editor_application_open (GApplication *app,
GFile **files,
int n_files,
const gchar *hint)
const char *hint)
{
NodeEditorWindow *win;
int i;

View File

@ -80,7 +80,7 @@ text_view_error_free (TextViewError *e)
g_free (e->message);
}
static gchar *
static char *
get_current_text (GtkTextBuffer *buffer)
{
GtkTextIter start, end;

View File

@ -33,7 +33,7 @@ update_title (GtkWindow *window)
static void
update_statusbar (void)
{
gchar *msg;
char *msg;
int row, col;
GtkTextIter iter;
const char *print_str;
@ -675,7 +675,7 @@ static GActionEntry app_entries[] = {
{ "print", activate_print, NULL, NULL, NULL }
};
static const gchar ui_info[] =
static const char ui_info[] =
"<interface>"
" <menu id='menubar'>"
" <submenu>"

View File

@ -250,12 +250,12 @@ activate_about (GSimpleAction *action,
gpointer user_data)
{
GtkApplication *app = user_data;
const gchar *authors[] = {
const char *authors[] = {
"Andrea Cimitan",
"Cosimo Cecchi",
NULL
};
gchar *version;
char *version;
GString *s;
s = g_string_new ("");
@ -423,7 +423,7 @@ spin_value_changed (GtkAdjustment *adjustment, GtkWidget *label)
{
GtkWidget *w;
int v;
gchar *text;
char *text;
v = (int)gtk_adjustment_get_value (adjustment);
@ -542,7 +542,7 @@ on_scale_button_value_changed (GtkScaleButton *button,
{
GtkAdjustment *adjustment;
gdouble val;
gchar *str;
char *str;
adjustment = gtk_scale_button_get_adjustment (button);
val = gtk_scale_button_get_value (button);
@ -703,7 +703,7 @@ action_dialog_button_clicked (GtkButton *button, GtkWidget *page)
static void
page_changed_cb (GtkWidget *stack, GParamSpec *pspec, gpointer data)
{
const gchar *name;
const char *name;
GtkWidget *window;
GtkWidget *page;
@ -853,10 +853,10 @@ update_title_header (GtkListBoxRow *row,
gpointer data)
{
GtkWidget *header;
gchar *title;
char *title;
header = gtk_list_box_row_get_header (row);
title = (gchar *)g_object_get_data (G_OBJECT (row), "title");
title = (char *)g_object_get_data (G_OBJECT (row), "title");
if (!header && title)
{
title = g_strdup_printf ("<b>%s</b>", title);
@ -881,8 +881,8 @@ overshot (GtkScrolledWindow *sw, GtkPositionType pos, GtkWidget *widget)
{
GtkWidget *box, *row, *label, *swatch;
GdkRGBA rgba;
const gchar *color;
gchar *text;
const char *color;
char *text;
GtkWidget *silver;
GtkWidget *gold;
@ -983,7 +983,7 @@ set_color (GtkListBox *box, GtkListBoxRow *row, GtkColorChooser *chooser)
static void
populate_colors (GtkWidget *widget, GtkWidget *chooser)
{
struct { const gchar *name; const gchar *color; const gchar *title; } colors[] = {
struct { const char *name; const char *color; const char *title; } colors[] = {
{ "2.5", "#C8828C", "Red" },
{ "5", "#C98286", NULL },
{ "7.5", "#C9827F", NULL },
@ -1081,7 +1081,7 @@ populate_colors (GtkWidget *widget, GtkWidget *chooser)
typedef struct {
GtkWidget *flowbox;
gchar *filename;
char *filename;
} BackgroundData;
static void
@ -1127,11 +1127,11 @@ background_loaded_cb (GObject *source,
static void
populate_flowbox (GtkWidget *flowbox)
{
const gchar *location;
const char *location;
GDir *dir;
GError *error = NULL;
const gchar *name;
gchar *filename;
const char *name;
char *filename;
GFile *file;
GInputStream *stream;
BackgroundData *bd;
@ -1288,7 +1288,7 @@ my_text_view_class_init (MyTextViewClass *class)
}
static void
my_text_view_set_background (MyTextView *tv, const gchar *filename, gboolean is_resource)
my_text_view_set_background (MyTextView *tv, const char *filename, gboolean is_resource)
{
GError *error = NULL;
GFile *file;
@ -1336,7 +1336,7 @@ close_selection_dialog (GtkWidget *dialog, int response, GtkWidget *tv)
GtkWidget *box;
GtkWidget *child;
GList *children;
const gchar *filename;
const char *filename;
gboolean is_resource;
gtk_widget_hide (dialog);
@ -1352,7 +1352,7 @@ close_selection_dialog (GtkWidget *dialog, int response, GtkWidget *tv)
return;
child = children->data;
filename = (const gchar *)g_object_get_data (G_OBJECT (child), "filename");
filename = (const char *)g_object_get_data (G_OBJECT (child), "filename");
is_resource = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (child), "is-resource"));
g_list_free (children);
@ -1377,8 +1377,8 @@ static void
handle_insert (GtkWidget *button, GtkWidget *textview)
{
GtkTextBuffer *buffer;
const gchar *id;
const gchar *text;
const char *id;
const char *text;
id = gtk_buildable_get_name (GTK_BUILDABLE (button));
@ -1402,7 +1402,7 @@ handle_cutcopypaste (GtkWidget *button, GtkWidget *textview)
{
GtkTextBuffer *buffer;
GdkClipboard *clipboard;
const gchar *id;
const char *id;
clipboard = gtk_widget_get_clipboard (textview);
buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (textview));
@ -1421,7 +1421,7 @@ handle_cutcopypaste (GtkWidget *button, GtkWidget *textview)
static void
clipboard_formats_notify (GdkClipboard *clipboard, GdkEvent *event, GtkWidget *button)
{
const gchar *id;
const char *id;
gboolean has_text;
id = gtk_buildable_get_name (GTK_BUILDABLE (button));
@ -1434,7 +1434,7 @@ clipboard_formats_notify (GdkClipboard *clipboard, GdkEvent *event, GtkWidget *b
static void
textbuffer_notify_selection (GObject *object, GParamSpec *pspec, GtkWidget *button)
{
const gchar *id;
const char *id;
gboolean has_selection;
id = gtk_buildable_get_name (GTK_BUILDABLE (button));
@ -1469,7 +1469,7 @@ page_combo_separator_func (GtkTreeModel *model,
GtkTreeIter *iter,
gpointer data)
{
gchar *text;
char *text;
gboolean res;
gtk_tree_model_get (model, iter, 0, &text, -1);
@ -1594,7 +1594,7 @@ text_view_add_to_context_menu (GtkTextView *text_view)
static void
open_popover_text_changed (GtkEntry *entry, GParamSpec *pspec, GtkWidget *button)
{
const gchar *text;
const char *text;
text = gtk_editable_get_text (GTK_EDITABLE (entry));
gtk_widget_set_sensitive (button, strlen (text) > 0);
@ -1864,8 +1864,8 @@ activate (GApplication *app)
{ "print", activate_print, NULL, NULL, NULL },
};
struct {
const gchar *action_and_target;
const gchar *accelerators[2];
const char *action_and_target;
const char *accelerators[2];
} accels[] = {
{ "app.about", { "F1", NULL } },
{ "app.quit", { "<Control>q", NULL } },
@ -1878,8 +1878,8 @@ activate (GApplication *app)
{ "win.lock", { "<Control>l", NULL } },
};
struct {
const gchar *action_and_target;
const gchar *accelerators[2];
const char *action_and_target;
const char *accelerators[2];
} late_accels[] = {
{ "app.cut", { "<Control>x", NULL } },
{ "app.copy", { "<Control>c", NULL } },

View File

@ -474,10 +474,10 @@ The maximum width of each column is given by the longest element in the
column:
```c
void gtk_type_set_property (GtkType *type,
const gchar *value,
GError **error);
const gchar *gtk_type_get_property (GtkType *type);
void gtk_type_set_property (GtkType *type,
const char *value,
GError **error);
const char *gtk_type_get_property (GtkType *type);
```
It is also possible to align the columns to the next tab:

View File

@ -798,7 +798,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
const gchar *hint)
const char *hint)
{
GList *windows;
ExampleAppWindow *win;
@ -1138,7 +1138,7 @@ example_app_startup (GApplication *app)
{
GtkBuilder *builder;
GMenuModel *app_menu;
const gchar *quit_accels[2] = { "&lt;Ctrl&gt;Q", NULL };
const char *quit_accels[2] = { "&lt;Ctrl&gt;Q", NULL };
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
@ -1476,7 +1476,7 @@ static void
search_text_changed (GtkEntry *entry,
ExampleAppWindow *win)
{
const gchar *text;
const char *text;
GtkWidget *tab;
GtkWidget *view;
GtkTextBuffer *buffer;

View File

@ -189,7 +189,7 @@ tree_selection_changed_cb (GtkTreeSelection *selection, gpointer data)
{
GtkTreeIter iter;
GtkTreeModel *model;
gchar *author;
char *author;
if (gtk_tree_selection_get_selected (selection, &model, &iter))
{

View File

@ -797,7 +797,7 @@ static WidgetInfo *
create_about_dialog (void)
{
GtkWidget *widget;
const gchar *authors[] = {
const char *authors[] = {
"Peter Mattis",
"Spencer Kimball",
"Josh MacDonald",

View File

@ -15,7 +15,7 @@ typedef enum
typedef struct WidgetInfo
{
GtkWidget *window;
gchar *name;
char *name;
gboolean no_focus;
gboolean include_decorations;
WidgetSize size;

View File

@ -32,7 +32,7 @@ static GActionEntry win_entries[] = {
{ "close", action_activated },
};
const gchar *menu_ui =
const char *menu_ui =
"<interface>"
" <menu id='doc-menu'>"
" <section>"

View File

@ -28,7 +28,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
const gchar *hint)
const char *hint)
{
GList *windows;
ExampleAppWindow *win;

View File

@ -25,7 +25,7 @@ static void
search_text_changed (GtkEntry *entry,
ExampleAppWindow *win)
{
const gchar *text;
const char *text;
GtkWidget *tab;
GtkWidget *view;
GtkTextBuffer *buffer;
@ -55,7 +55,7 @@ static void
find_word (GtkButton *button,
ExampleAppWindow *win)
{
const gchar *word;
const char *word;
word = gtk_button_get_label (button);
gtk_editable_set_text (GTK_EDITABLE (win->searchentry), word);
@ -69,7 +69,7 @@ update_words (ExampleAppWindow *win)
GtkWidget *tab, *view, *row;
GtkTextBuffer *buffer;
GtkTextIter start, end;
gchar *word, *key;
char *word, *key;
GtkWidget *child;
tab = gtk_stack_get_visible_child (GTK_STACK (win->stack));
@ -121,7 +121,7 @@ update_lines (ExampleAppWindow *win)
GtkWidget *tab, *view;
GtkTextBuffer *buffer;
int count;
gchar *lines;
char *lines;
tab = gtk_stack_get_visible_child (GTK_STACK (win->stack));
@ -248,9 +248,9 @@ void
example_app_window_open (ExampleAppWindow *win,
GFile *file)
{
gchar *basename;
char *basename;
GtkWidget *scrolled, *view;
gchar *contents;
char *contents;
gsize length;
GtkTextBuffer *buffer;
GtkTextTag *tag;

View File

@ -28,7 +28,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
const gchar *hint)
const char *hint)
{
GList *windows;
ExampleAppWindow *win;

View File

@ -28,7 +28,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
const gchar *hint)
const char *hint)
{
GList *windows;
ExampleAppWindow *win;

View File

@ -36,9 +36,9 @@ void
example_app_window_open (ExampleAppWindow *win,
GFile *file)
{
gchar *basename;
char *basename;
GtkWidget *scrolled, *view;
gchar *contents;
char *contents;
gsize length;
basename = g_file_get_basename (file);

View File

@ -39,7 +39,7 @@ static GActionEntry app_entries[] =
static void
example_app_startup (GApplication *app)
{
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
@ -64,7 +64,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
const gchar *hint)
const char *hint)
{
GList *windows;
ExampleAppWindow *win;

View File

@ -46,9 +46,9 @@ void
example_app_window_open (ExampleAppWindow *win,
GFile *file)
{
gchar *basename;
char *basename;
GtkWidget *scrolled, *view;
gchar *contents;
char *contents;
gsize length;
basename = g_file_get_basename (file);

View File

@ -39,7 +39,7 @@ static GActionEntry app_entries[] =
static void
example_app_startup (GApplication *app)
{
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
@ -64,7 +64,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
const gchar *hint)
const char *hint)
{
GList *windows;
ExampleAppWindow *win;

View File

@ -66,9 +66,9 @@ void
example_app_window_open (ExampleAppWindow *win,
GFile *file)
{
gchar *basename;
char *basename;
GtkWidget *scrolled, *view;
gchar *contents;
char *contents;
gsize length;
GtkTextBuffer *buffer;
GtkTextTag *tag;

View File

@ -46,7 +46,7 @@ static GActionEntry app_entries[] =
static void
example_app_startup (GApplication *app)
{
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
@ -71,7 +71,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
const gchar *hint)
const char *hint)
{
GList *windows;
ExampleAppWindow *win;

View File

@ -67,9 +67,9 @@ void
example_app_window_open (ExampleAppWindow *win,
GFile *file)
{
gchar *basename;
char *basename;
GtkWidget *scrolled, *view;
gchar *contents;
char *contents;
gsize length;
GtkTextBuffer *buffer;
GtkTextTag *tag;

View File

@ -46,7 +46,7 @@ static GActionEntry app_entries[] =
static void
example_app_startup (GApplication *app)
{
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
@ -71,7 +71,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
const gchar *hint)
const char *hint)
{
GList *windows;
ExampleAppWindow *win;

View File

@ -20,7 +20,7 @@ static void
search_text_changed (GtkEntry *entry,
ExampleAppWindow *win)
{
const gchar *text;
const char *text;
GtkWidget *tab;
GtkWidget *view;
GtkTextBuffer *buffer;
@ -120,9 +120,9 @@ void
example_app_window_open (ExampleAppWindow *win,
GFile *file)
{
gchar *basename;
char *basename;
GtkWidget *scrolled, *view;
gchar *contents;
char *contents;
gsize length;
GtkTextBuffer *buffer;
GtkTextTag *tag;

View File

@ -46,7 +46,7 @@ static GActionEntry app_entries[] =
static void
example_app_startup (GApplication *app)
{
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
@ -71,7 +71,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
const gchar *hint)
const char *hint)
{
GList *windows;
ExampleAppWindow *win;

View File

@ -23,7 +23,7 @@ static void
search_text_changed (GtkEntry *entry,
ExampleAppWindow *win)
{
const gchar *text;
const char *text;
GtkWidget *tab;
GtkWidget *view;
GtkTextBuffer *buffer;
@ -53,7 +53,7 @@ static void
find_word (GtkButton *button,
ExampleAppWindow *win)
{
const gchar *word;
const char *word;
word = gtk_button_get_label (button);
gtk_editable_set_text (GTK_EDITABLE (win->searchentry), word);
@ -67,7 +67,7 @@ update_words (ExampleAppWindow *win)
GtkWidget *tab, *view, *row;
GtkTextBuffer *buffer;
GtkTextIter start, end;
gchar *word, *key;
char *word, *key;
GtkWidget *child;
tab = gtk_stack_get_visible_child (GTK_STACK (win->stack));
@ -212,9 +212,9 @@ void
example_app_window_open (ExampleAppWindow *win,
GFile *file)
{
gchar *basename;
char *basename;
GtkWidget *scrolled, *view;
gchar *contents;
char *contents;
gsize length;
GtkTextBuffer *buffer;
GtkTextTag *tag;

View File

@ -46,7 +46,7 @@ static GActionEntry app_entries[] =
static void
example_app_startup (GApplication *app)
{
const gchar *quit_accels[2] = { "<Ctrl>Q", NULL };
const char *quit_accels[2] = { "<Ctrl>Q", NULL };
G_APPLICATION_CLASS (example_app_parent_class)->startup (app);
@ -71,7 +71,7 @@ static void
example_app_open (GApplication *app,
GFile **files,
int n_files,
const gchar *hint)
const char *hint)
{
GList *windows;
ExampleAppWindow *win;

View File

@ -25,7 +25,7 @@ static void
search_text_changed (GtkEntry *entry,
ExampleAppWindow *win)
{
const gchar *text;
const char *text;
GtkWidget *tab;
GtkWidget *view;
GtkTextBuffer *buffer;
@ -55,7 +55,7 @@ static void
find_word (GtkButton *button,
ExampleAppWindow *win)
{
const gchar *word;
const char *word;
word = gtk_button_get_label (button);
gtk_editable_set_text (GTK_EDITABLE (win->searchentry), word);
@ -69,7 +69,7 @@ update_words (ExampleAppWindow *win)
GtkWidget *tab, *view, *row;
GtkTextBuffer *buffer;
GtkTextIter start, end;
gchar *word, *key;
char *word, *key;
GtkWidget *child;
tab = gtk_stack_get_visible_child (GTK_STACK (win->stack));
@ -121,7 +121,7 @@ update_lines (ExampleAppWindow *win)
GtkWidget *tab, *view;
GtkTextBuffer *buffer;
int count;
gchar *lines;
char *lines;
tab = gtk_stack_get_visible_child (GTK_STACK (win->stack));
@ -246,9 +246,9 @@ void
example_app_window_open (ExampleAppWindow *win,
GFile *file)
{
gchar *basename;
char *basename;
GtkWidget *scrolled, *view;
gchar *contents;
char *contents;
gsize length;
GtkTextBuffer *buffer;
GtkTextTag *tag;

View File

@ -77,7 +77,7 @@ change_justify_state (GSimpleAction *action,
gpointer user_data)
{
GtkTextView *text = g_object_get_data (user_data, "bloatpad-text");
const gchar *str;
const char *str;
str = g_variant_get_string (state, NULL);
@ -265,7 +265,7 @@ new_window (GApplication *app,
if (file != NULL)
{
gchar *contents;
char *contents;
gsize length;
if (g_file_load_contents (file, NULL, &contents, &length, NULL, NULL))
@ -294,7 +294,7 @@ static void
bloat_pad_open (GApplication *application,
GFile **files,
int n_files,
const gchar *hint)
const char *hint)
{
int i;
@ -345,9 +345,9 @@ combo_changed (GtkComboBox *combo,
gpointer user_data)
{
GtkEntry *entry = g_object_get_data (user_data, "entry");
const gchar *action;
gchar **accels;
gchar *str;
const char *action;
char **accels;
char *str;
action = gtk_combo_box_get_active_id (combo);
@ -368,9 +368,9 @@ response (GtkDialog *dialog,
{
GtkEntry *entry = g_object_get_data (user_data, "entry");
GtkComboBox *combo = g_object_get_data (user_data, "combo");
const gchar *action;
const gchar *str;
gchar **accels;
const char *action;
const char *str;
char **accels;
if (response_id == GTK_RESPONSE_CLOSE)
{
@ -386,7 +386,7 @@ response (GtkDialog *dialog,
str = gtk_editable_get_text (GTK_EDITABLE (entry));
accels = g_strsplit (str, ",", 0);
gtk_application_set_accels_for_action (gtk_window_get_application (user_data), action, (const gchar **) accels);
gtk_application_set_accels_for_action (gtk_window_get_application (user_data), action, (const char **) accels);
g_strfreev (accels);
}
@ -398,7 +398,7 @@ edit_accels (GSimpleAction *action,
GtkApplication *app = user_data;
GtkWidget *combo;
GtkWidget *entry;
gchar **actions;
char **actions;
GtkWidget *dialog;
int i;
@ -426,7 +426,7 @@ update_time (gpointer user_data)
{
BloatPad *bloatpad = user_data;
GDateTime *now;
gchar *time;
char *time;
while (g_menu_model_get_n_items (G_MENU_MODEL (bloatpad->time)))
g_menu_remove (bloatpad->time, 0);
@ -481,14 +481,14 @@ static GActionEntry app_entries[] = {
static void
dump_accels (GtkApplication *app)
{
gchar **actions;
char **actions;
int i;
actions = gtk_application_list_action_descriptions (app);
for (i = 0; actions[i]; i++)
{
gchar **accels;
gchar *str;
char **accels;
char *str;
accels = gtk_application_get_accels_for_action (app, actions[i]);
@ -514,8 +514,8 @@ bloat_pad_startup (GApplication *application)
GFile *file;
int i;
struct {
const gchar *action_and_target;
const gchar *accelerators[2];
const char *action_and_target;
const char *accelerators[2];
} accels[] = {
{ "app.new", { "<Control>n", NULL } },
{ "app.quit", { "<Control>q", NULL } },
@ -592,7 +592,7 @@ bloat_pad_startup (GApplication *application)
g_object_unref (item);
g_object_unref (icon);
const gchar *new_accels[] = { "<Control>n", "<Control>t", NULL };
const char *new_accels[] = { "<Control>n", "<Control>t", NULL };
gtk_application_set_accels_for_action (GTK_APPLICATION (application), "app.new", new_accels);
dump_accels (GTK_APPLICATION (application));
@ -657,7 +657,7 @@ main (int argc, char **argv)
{
BloatPad *bloat_pad;
int status;
const gchar *accels[] = { "F11", NULL };
const char *accels[] = { "F11", NULL };
bloat_pad = bloat_pad_new ();

View File

@ -99,7 +99,7 @@ new_window (GApplication *app,
if (file != NULL)
{
gchar *contents;
char *contents;
gsize length;
if (g_file_load_contents (file, NULL, &contents, &length, NULL, NULL))
@ -125,7 +125,7 @@ static void
plug_man_open (GApplication *application,
GFile **files,
int n_files,
const gchar *hint)
const char *hint)
{
int i;
@ -184,7 +184,7 @@ static gboolean is_red_plugin_enabled;
static gboolean is_black_plugin_enabled;
static gboolean
plugin_enabled (const gchar *name)
plugin_enabled (const char *name)
{
if (g_strcmp0 (name, "red") == 0)
return is_red_plugin_enabled;
@ -228,7 +228,7 @@ plugin_action (GAction *action,
}
static void
enable_plugin (const gchar *name)
enable_plugin (const char *name)
{
GMenuModel *plugin_menu;
GAction *action;
@ -246,8 +246,8 @@ enable_plugin (const gchar *name)
{
GMenu *section;
GMenuItem *item;
gchar *label;
gchar *action_name;
char *label;
char *action_name;
section = g_menu_new ();
label = g_strdup_printf ("Turn text %s", name);
@ -272,7 +272,7 @@ enable_plugin (const gchar *name)
}
static void
disable_plugin (const gchar *name)
disable_plugin (const char *name)
{
GMenuModel *plugin_menu;
@ -285,7 +285,7 @@ disable_plugin (const gchar *name)
for (i = 0; i < g_menu_model_get_n_items (plugin_menu); i++)
{
gchar *id;
char *id;
if (g_menu_model_get_item_attribute (plugin_menu, i, "id", "s", &id))
{
if (g_strcmp0 (id, name) == 0)
@ -311,7 +311,7 @@ disable_plugin (const gchar *name)
static void
enable_or_disable_plugin (GtkToggleButton *button,
const gchar *name)
const char *name)
{
if (plugin_enabled (name))
disable_plugin (name);
@ -498,7 +498,7 @@ main (int argc, char **argv)
{
PlugMan *plug_man;
int status;
const gchar *accels[] = { "F11", NULL };
const char *accels[] = { "F11", NULL };
plug_man = plug_man_new ();
gtk_application_set_accels_for_action (GTK_APPLICATION (plug_man),

View File

@ -34,7 +34,7 @@ activate_cb (GtkApplication *app,
int
main (int argc,
gchar *argv[])
char *argv[])
{
GtkApplication *app;

View File

@ -30,7 +30,7 @@ new_window (GApplication *app,
if (file != NULL)
{
gchar *contents;
char *contents;
gsize length;
if (g_file_load_contents (file, NULL, &contents, &length, NULL, NULL))
@ -56,7 +56,7 @@ static void
open (GApplication *application,
GFile **files,
int n_files,
const gchar *hint)
const char *hint)
{
int i;

View File

@ -1060,8 +1060,8 @@ send_error (HttpRequest *request,
#define SEC_WEB_SOCKET_KEY_MAGIC "258EAFA5-E914-47DA-95CA-C5AB0DC85B11"
/* 'x3JJHMbDL1EzLkh9GBhXDw==' generates 'HSmrc0sMlYUkAGmm5OPpG2HaGWk=' */
static gchar *
generate_handshake_response_wsietf_v7 (const gchar *key)
static char *
generate_handshake_response_wsietf_v7 (const char *key)
{
gsize digest_len = 20;
guchar digest[20];

View File

@ -175,7 +175,7 @@ create_touchscreen (GdkDisplay *display)
}
GdkDisplay *
_gdk_broadway_display_open (const gchar *display_name)
_gdk_broadway_display_open (const char *display_name)
{
GdkDisplay *display;
GdkBroadwayDisplay *broadway_display;
@ -225,12 +225,12 @@ _gdk_broadway_display_open (const gchar *display_name)
return display;
}
static const gchar *
static const char *
gdk_broadway_display_get_name (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
return (gchar *) "Broadway";
return (char *) "Broadway";
}
static void
@ -311,7 +311,7 @@ gdk_broadway_display_finalize (GObject *object)
static void
gdk_broadway_display_notify_startup_complete (GdkDisplay *display,
const gchar *startup_id)
const char *startup_id)
{
}

View File

@ -89,10 +89,10 @@ void _gdk_broadway_events_got_input (GdkDisplay *display,
BroadwayInputMsg *message);
void _gdk_broadway_display_init_root_window (GdkDisplay *display);
GdkDisplay * _gdk_broadway_display_open (const gchar *display_name);
GdkDisplay * _gdk_broadway_display_open (const char *display_name);
void _gdk_broadway_display_queue_events (GdkDisplay *display);
GdkCursor*_gdk_broadway_display_get_cursor_for_name (GdkDisplay *display,
const gchar *name);
const char *name);
GdkCursor *_gdk_broadway_display_get_cursor_for_texture (GdkDisplay *display,
GdkTexture *texture,
int x,

View File

@ -660,13 +660,13 @@ gdk_broadway_surface_set_geometry_hints (GdkSurface *surface,
static void
gdk_broadway_surface_set_title (GdkSurface *surface,
const gchar *title)
const char *title)
{
}
static void
gdk_broadway_surface_set_startup_id (GdkSurface *surface,
const gchar *startup_id)
const char *startup_id)
{
}

View File

@ -30,7 +30,7 @@ void gdk_display_set_cursor_theme (GdkDisplay *display,
gboolean gdk_running_in_sandbox (void);
gboolean gdk_should_use_portal (void);
const gchar * gdk_get_startup_notification_id (void);
const char * gdk_get_startup_notification_id (void);
PangoDirection gdk_unichar_direction (gunichar ch);
PangoDirection gdk_find_base_dir (const char *text,

View File

@ -163,7 +163,7 @@ static const GdkDebugKey gdk_debug_keys[] = {
G_DEFINE_CONSTRUCTOR(stash_desktop_startup_notification_id)
#endif
static gchar *startup_notification_id = NULL;
static char *startup_notification_id = NULL;
static void
stash_desktop_startup_notification_id (void)
@ -209,8 +209,8 @@ gdk_parse_debug_var (const char *variable,
guint i;
guint result = 0;
const char *string;
const gchar *p;
const gchar *q;
const char *p;
const char *q;
gboolean invert;
gboolean help;
@ -352,7 +352,7 @@ gdk_display_open_default (void)
* Returns: (nullable) (transfer none): the original value of the
* DESKTOP_STARTUP_ID environment variable, or %NULL.
*/
const gchar *
const char *
gdk_get_startup_notification_id (void)
{
return startup_notification_id;
@ -402,11 +402,11 @@ gdk_unichar_direction (gunichar ch)
}
PangoDirection
gdk_find_base_dir (const gchar *text,
gdk_find_base_dir (const char *text,
int length)
{
PangoDirection dir = PANGO_DIRECTION_NEUTRAL;
const gchar *p;
const char *p;
g_return_val_if_fail (text != NULL || length == 0, PANGO_DIRECTION_NEUTRAL);

View File

@ -60,14 +60,14 @@
*/
static void gdk_app_launch_context_finalize (GObject *object);
static gchar * gdk_app_launch_context_get_display_name (GAppLaunchContext *context,
static char * gdk_app_launch_context_get_display_name (GAppLaunchContext *context,
GAppInfo *info,
GList *files);
static gchar * gdk_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
static char * gdk_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
GAppInfo *info,
GList *files);
static void gdk_app_launch_context_launch_failed (GAppLaunchContext *context,
const gchar *startup_notify_id);
const char *startup_notify_id);
enum
@ -157,7 +157,7 @@ gdk_app_launch_context_finalize (GObject *object)
G_OBJECT_CLASS (gdk_app_launch_context_parent_class)->finalize (object);
}
static gchar *
static char *
gdk_app_launch_context_get_display_name (GAppLaunchContext *context,
GAppInfo *info,
GList *files)
@ -298,6 +298,6 @@ gdk_app_launch_context_get_startup_notify_id (GAppLaunchContext *context,
static void
gdk_app_launch_context_launch_failed (GAppLaunchContext *context,
const gchar *startup_notify_id)
const char *startup_notify_id)
{
}

View File

@ -1103,7 +1103,7 @@ gdk_clipboard_write_async (GdkClipboard *clipboard,
return;
}
mime_formats = gdk_content_formats_new ((const gchar *[2]) { mime_type, NULL }, 1);
mime_formats = gdk_content_formats_new ((const char *[2]) { mime_type, NULL }, 1);
mime_formats = gdk_content_formats_union_serialize_gtypes (mime_formats);
gtype = gdk_content_formats_match_gtype (formats, mime_formats);
if (gtype != G_TYPE_INVALID)

View File

@ -835,7 +835,7 @@ init (void)
for (f = formats; f; f = f->next)
{
GdkPixbufFormat *fmt = f->data;
gchar *name;
char *name;
name = gdk_pixbuf_format_get_name (fmt);
if (g_str_equal (name, "png"))
@ -854,7 +854,7 @@ init (void)
for (f = formats; f; f = f->next)
{
GdkPixbufFormat *fmt = f->data;
gchar **mimes, **m;
char **mimes, **m;
mimes = gdk_pixbuf_format_get_mime_types (fmt);
for (m = mimes; *m; m++)

View File

@ -864,7 +864,7 @@ init (void)
for (f = formats; f; f = f->next)
{
GdkPixbufFormat *fmt = f->data;
gchar *name;
char *name;
name = gdk_pixbuf_format_get_name (fmt);
if (g_str_equal (name, "png"))
@ -883,7 +883,7 @@ init (void)
for (f = formats; f; f = f->next)
{
GdkPixbufFormat *fmt = f->data;
gchar **mimes, **m;
char **mimes, **m;
if (!gdk_pixbuf_format_is_writable (fmt))
continue;

View File

@ -319,7 +319,7 @@ gdk_cursor_equal (gconstpointer a,
* cursor with the given name
*/
GdkCursor*
gdk_cursor_new_from_name (const gchar *name,
gdk_cursor_new_from_name (const char *name,
GdkCursor *fallback)
{
g_return_val_if_fail (name != NULL, NULL);

View File

@ -50,7 +50,7 @@ GdkCursor* gdk_cursor_new_from_texture (GdkTexture *texture,
int hotspot_y,
GdkCursor *fallback);
GDK_AVAILABLE_IN_ALL
GdkCursor* gdk_cursor_new_from_name (const gchar *name,
GdkCursor* gdk_cursor_new_from_name (const char *name,
GdkCursor *fallback);
GDK_AVAILABLE_IN_ALL

View File

@ -634,7 +634,7 @@ gdk_device_get_surface_at_position (GdkDevice *device,
*
* Returns: a name
**/
const gchar *
const char *
gdk_device_get_name (GdkDevice *device)
{
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
@ -1297,10 +1297,10 @@ _gdk_device_surface_at_position (GdkDevice *device,
* static GSettings *
* get_device_settings (GdkDevice *device)
* {
* const gchar *vendor, *product;
* const char *vendor, *product;
* GSettings *settings;
* GdkDevice *device;
* gchar *path;
* char *path;
*
* vendor = gdk_device_get_vendor_id (device);
* product = gdk_device_get_product_id (device);
@ -1315,7 +1315,7 @@ _gdk_device_surface_at_position (GdkDevice *device,
*
* Returns: (nullable): the vendor ID, or %NULL
*/
const gchar *
const char *
gdk_device_get_vendor_id (GdkDevice *device)
{
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);
@ -1334,7 +1334,7 @@ gdk_device_get_vendor_id (GdkDevice *device)
*
* Returns: (nullable): the product ID, or %NULL
*/
const gchar *
const char *
gdk_device_get_product_id (GdkDevice *device)
{
g_return_val_if_fail (GDK_IS_DEVICE (device), NULL);

View File

@ -100,7 +100,7 @@ GDK_AVAILABLE_IN_ALL
GType gdk_device_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
const gchar * gdk_device_get_name (GdkDevice *device);
const char * gdk_device_get_name (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
gboolean gdk_device_get_has_cursor (GdkDevice *device);
@ -142,9 +142,9 @@ GDK_AVAILABLE_IN_ALL
GdkDeviceType gdk_device_get_device_type (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
const gchar *gdk_device_get_vendor_id (GdkDevice *device);
const char *gdk_device_get_vendor_id (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
const gchar *gdk_device_get_product_id (GdkDevice *device);
const char *gdk_device_get_product_id (GdkDevice *device);
GDK_AVAILABLE_IN_ALL
GdkSeat *gdk_device_get_seat (GdkDevice *device);

View File

@ -36,7 +36,7 @@ struct _GdkDevice
{
GObject parent_instance;
gchar *name;
char *name;
GdkInputSource source;
gboolean has_cursor;
GdkAxisFlags axis_flags;
@ -50,8 +50,8 @@ struct _GdkDevice
GArray *axes;
guint num_touches;
gchar *vendor_id;
gchar *product_id;
char *vendor_id;
char *product_id;
GdkSeat *seat;
GdkDeviceTool *last_tool;

View File

@ -931,7 +931,7 @@ gdk_display_device_is_grabbed (GdkDisplay *display,
* Returns: a string representing the display name. This string is owned
* by GDK and should not be modified or freed.
*/
const gchar *
const char *
gdk_display_get_name (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
@ -1127,7 +1127,7 @@ gdk_display_get_app_launch_context (GdkDisplay *display)
* display could not be opened
*/
GdkDisplay *
gdk_display_open (const gchar *display_name)
gdk_display_open (const char *display_name)
{
return gdk_display_manager_open_display (gdk_display_manager_get (),
display_name);
@ -1172,7 +1172,7 @@ _gdk_display_get_next_serial (GdkDisplay *display)
*/
void
gdk_display_notify_startup_complete (GdkDisplay *display,
const gchar *startup_id)
const char *startup_id)
{
g_return_if_fail (GDK_IS_DISPLAY (display));
@ -1188,7 +1188,7 @@ gdk_display_notify_startup_complete (GdkDisplay *display,
*
* Returns: the startup notification ID for @display, or %NULL
*/
const gchar *
const char *
gdk_display_get_startup_notification_id (GdkDisplay *display)
{
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);

View File

@ -41,10 +41,10 @@ G_BEGIN_DECLS
GDK_AVAILABLE_IN_ALL
GType gdk_display_get_type (void) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
GdkDisplay *gdk_display_open (const gchar *display_name);
GdkDisplay *gdk_display_open (const char *display_name);
GDK_AVAILABLE_IN_ALL
const gchar * gdk_display_get_name (GdkDisplay *display);
const char * gdk_display_get_name (GdkDisplay *display);
GDK_AVAILABLE_IN_ALL
gboolean gdk_display_device_is_grabbed (GdkDisplay *display,
@ -81,9 +81,9 @@ GdkClipboard * gdk_display_get_primary_clipboard (GdkDisplay
GDK_AVAILABLE_IN_ALL
void gdk_display_notify_startup_complete (GdkDisplay *display,
const gchar *startup_id);
const char *startup_id);
GDK_AVAILABLE_IN_ALL
const gchar * gdk_display_get_startup_notification_id (GdkDisplay *display);
const char * gdk_display_get_startup_notification_id (GdkDisplay *display);
GDK_AVAILABLE_IN_ALL
GdkAppLaunchContext *gdk_display_get_app_launch_context (GdkDisplay *display);

View File

@ -215,7 +215,7 @@ gdk_display_manager_get_property (GObject *object,
}
}
static const gchar *allowed_backends;
static const char *allowed_backends;
/**
* gdk_set_allowed_backends:
@ -250,7 +250,7 @@ static const gchar *allowed_backends;
* in order to take effect.
*/
void
gdk_set_allowed_backends (const gchar *backends)
gdk_set_allowed_backends (const char *backends)
{
allowed_backends = g_strdup (backends);
}
@ -389,11 +389,11 @@ gdk_display_manager_list_displays (GdkDisplayManager *manager)
*/
GdkDisplay *
gdk_display_manager_open_display (GdkDisplayManager *manager,
const gchar *name)
const char *name)
{
const gchar *backend_list;
const char *backend_list;
GdkDisplay *display;
gchar **backends;
char **backends;
int i, j;
gboolean allow_any;
@ -419,7 +419,7 @@ gdk_display_manager_open_display (GdkDisplayManager *manager,
for (i = 0; display == NULL && backends[i] != NULL; i++)
{
const gchar *backend = backends[i];
const char *backend = backends[i];
gboolean any = g_str_equal (backend, "*");
if (!allow_any && !any && !strstr (allowed_backends, backend))

View File

@ -54,9 +54,9 @@ GDK_AVAILABLE_IN_ALL
GSList * gdk_display_manager_list_displays (GdkDisplayManager *manager);
GDK_AVAILABLE_IN_ALL
GdkDisplay * gdk_display_manager_open_display (GdkDisplayManager *manager,
const gchar *name);
const char *name);
GDK_AVAILABLE_IN_ALL
void gdk_set_allowed_backends (const gchar *backends);
void gdk_set_allowed_backends (const char *backends);
G_END_DECLS

View File

@ -116,7 +116,7 @@ struct _GdkDisplayClass
GType vk_context_type; /* type for GdkVulkanContext, must be set if vk_extension_name != NULL */
const char *vk_extension_name; /* Name of required windowing vulkan extension or %NULL (default) if Vulkan isn't supported */
const gchar * (*get_name) (GdkDisplay *display);
const char * (*get_name) (GdkDisplay *display);
void (*beep) (GdkDisplay *display);
void (*sync) (GdkDisplay *display);
void (*flush) (GdkDisplay *display);
@ -130,8 +130,8 @@ struct _GdkDisplayClass
gulong (*get_next_serial) (GdkDisplay *display);
void (*notify_startup_complete) (GdkDisplay *display,
const gchar *startup_id);
const gchar * (*get_startup_notification_id) (GdkDisplay *display);
const char *startup_id);
const char * (*get_startup_notification_id) (GdkDisplay *display);
void (*event_data_copy) (GdkDisplay *display,
GdkEvent *event,

View File

@ -37,7 +37,7 @@
static struct {
GdkDragAction action;
const gchar *name;
const char *name;
GdkCursor *cursor;
} drag_cursors[] = {
{ GDK_ACTION_ASK, "dnd-ask", NULL },
@ -604,7 +604,7 @@ gdk_drag_write_async (GdkDrag *drag,
return;
}
mime_formats = gdk_content_formats_new ((const gchar *[2]) { mime_type, NULL }, 1);
mime_formats = gdk_content_formats_new ((const char *[2]) { mime_type, NULL }, 1);
mime_formats = gdk_content_formats_union_serialize_gtypes (mime_formats);
gtype = gdk_content_formats_match_gtype (formats, mime_formats);
if (gtype != G_TYPE_INVALID)

View File

@ -120,7 +120,7 @@ value_event_collect_value (GValue *value,
return NULL;
}
static gchar *
static char *
value_event_lcopy_value (const GValue *value,
guint n_collect_values,
GTypeCValue *collect_values,

View File

@ -455,7 +455,7 @@ gdk_gl_context_push_debug_group_printf (GdkGLContext *context,
...)
{
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
gchar *message;
char *message;
va_list args;
if (priv->use_khr_debug)
@ -501,7 +501,7 @@ gdk_gl_context_label_object_printf (GdkGLContext *context,
...)
{
GdkGLContextPrivate *priv = gdk_gl_context_get_instance_private (context);
gchar *message;
char *message;
va_list args;
if (priv->use_khr_debug)

View File

@ -93,7 +93,7 @@ gboolean gdk_gl_context_has_unpack_subimage (GdkGLContext
void gdk_gl_context_push_debug_group (GdkGLContext *context,
const char *message);
void gdk_gl_context_push_debug_group_printf (GdkGLContext *context,
const gchar *format,
const char *format,
...) G_GNUC_PRINTF (2, 3);
void gdk_gl_context_pop_debug_group (GdkGLContext *context);
void gdk_gl_context_label_object (GdkGLContext *context,

View File

@ -43,10 +43,10 @@ gdk_keys_keyval_compare (const void *pkey, const void *pbase)
return (*(int *) pkey) - ((gdk_key *) pbase)->keyval;
}
static gchar*
static char *
_gdk_keyval_name (guint keyval)
{
static gchar buf[100];
static char buf[100];
gdk_key *found;
/* Check for directly encoded 24-bit UCS characters: */
@ -66,7 +66,7 @@ _gdk_keyval_name (guint keyval)
((found - 1)->keyval == keyval))
found--;
return (gchar *) (keynames + found->offset);
return (char *) (keynames + found->offset);
}
else if (keyval != 0)
{
@ -85,7 +85,7 @@ gdk_keys_name_compare (const void *pkey, const void *pbase)
}
static guint
_gdk_keyval_from_name (const gchar *keyval_name)
_gdk_keyval_from_name (const char *keyval_name)
{
gdk_key *found;

View File

@ -757,7 +757,7 @@ gdk_keymap_translate_keyboard_state (GdkKeymap *keymap,
* of the key, or %NULL if @keyval is not a valid key. The string
* should not be modified.
*/
const gchar *
const char *
gdk_keyval_name (guint keyval)
{
return _gdk_keyval_name (keyval);
@ -777,7 +777,7 @@ gdk_keyval_name (guint keyval)
* if the key name is not a valid key
*/
guint
gdk_keyval_from_name (const gchar *keyval_name)
gdk_keyval_from_name (const char *keyval_name)
{
return _gdk_keyval_from_name (keyval_name);
}

View File

@ -38,7 +38,7 @@ GDK_AVAILABLE_IN_ALL
const char *gdk_keyval_name (guint keyval) G_GNUC_CONST;
GDK_AVAILABLE_IN_ALL
guint gdk_keyval_from_name (const gchar *keyval_name);
guint gdk_keyval_from_name (const char *keyval_name);
GDK_AVAILABLE_IN_ALL
void gdk_keyval_convert_case (guint symbol,
guint *lower,

View File

@ -55,7 +55,7 @@ gdk_profiler_start (int fd)
if (fd == -1)
{
gchar *filename;
char *filename;
filename = g_strdup_printf ("gtk.%d.syscap", getpid ());
g_print ("Writing profiling data to %s\n", filename);

View File

@ -130,8 +130,8 @@ gdk_rgba_is_opaque (const GdkRGBA *rgba)
* rgb() or rgba() specification.
*/
static gboolean
parse_rgb_value (const gchar *str,
gchar **endp,
parse_rgb_value (const char *str,
char **endp,
gdouble *number)
{
const char *p;
@ -183,12 +183,12 @@ parse_rgb_value (const gchar *str,
*/
gboolean
gdk_rgba_parse (GdkRGBA *rgba,
const gchar *spec)
const char *spec)
{
gboolean has_alpha;
gdouble r, g, b, a;
gchar *str = (gchar *) spec;
gchar *p;
char *str = (char *) spec;
char *p;
g_return_val_if_fail (spec != NULL, FALSE);
@ -370,7 +370,7 @@ gdk_rgba_equal (gconstpointer p1,
*
* Returns: A newly allocated text string
*/
gchar *
char *
gdk_rgba_to_string (const GdkRGBA *rgba)
{
if (rgba->alpha > 0.999)
@ -382,7 +382,7 @@ gdk_rgba_to_string (const GdkRGBA *rgba)
}
else
{
gchar alpha[G_ASCII_DTOSTR_BUF_SIZE];
char alpha[G_ASCII_DTOSTR_BUF_SIZE];
g_ascii_formatd (alpha, G_ASCII_DTOSTR_BUF_SIZE, "%g", CLAMP (rgba->alpha, 0, 1));

View File

@ -65,9 +65,9 @@ gboolean gdk_rgba_equal (gconstpointer p1,
GDK_AVAILABLE_IN_ALL
gboolean gdk_rgba_parse (GdkRGBA *rgba,
const gchar *spec);
const char *spec);
GDK_AVAILABLE_IN_ALL
gchar * gdk_rgba_to_string (const GdkRGBA *rgba);
char * gdk_rgba_to_string (const GdkRGBA *rgba);
G_END_DECLS

View File

@ -2763,8 +2763,8 @@ add_event_mark (GdkEvent *event,
gint64 time,
guint64 duration)
{
gchar *message = NULL;
const gchar *kind;
char *message = NULL;
const char *kind;
GEnumClass *class;
GEnumValue *value;
GdkEventType event_type;

View File

@ -971,7 +971,7 @@ gdk_display_create_vulkan_device (GdkDisplay *display,
0,
NULL,
device_extensions->len,
(const gchar * const *) device_extensions->pdata
(const char * const *) device_extensions->pdata
},
NULL,
&display->vk_device) != VK_SUCCESS)

View File

@ -84,7 +84,7 @@ CUSTOM_CURSOR_CTOR(gdkZoomOutCursor, 43)
@end
struct CursorsByName {
const gchar *name;
const char *name;
NSString *selector;
};

View File

@ -83,7 +83,7 @@ struct _GdkMacosDisplayClass
};
GdkDisplay *_gdk_macos_display_open (const gchar *display_name);
GdkDisplay *_gdk_macos_display_open (const char *display_name);
int _gdk_macos_display_get_fd (GdkMacosDisplay *self);
void _gdk_macos_display_queue_events (GdkMacosDisplay *self);
void _gdk_macos_display_to_display_coords (GdkMacosDisplay *self,
@ -129,7 +129,7 @@ NSWindow *_gdk_macos_display_find_native_under_pointer (GdkMacosDisp
int *x,
int *y);
gboolean _gdk_macos_display_get_setting (GdkMacosDisplay *self,
const gchar *setting,
const char *setting,
GValue *value);
void _gdk_macos_display_reload_settings (GdkMacosDisplay *self);
void _gdk_macos_display_surface_resigned_main (GdkMacosDisplay *self,

View File

@ -96,7 +96,7 @@ _gdk_macos_settings_load (GdkMacosSettings *settings)
gboolean
_gdk_macos_display_get_setting (GdkMacosDisplay *self,
const gchar *setting,
const char *setting,
GValue *value)
{
GDK_BEGIN_MACOS_ALLOC_POOL;

View File

@ -94,7 +94,7 @@ get_monitor (GdkMacosDisplay *self,
static gboolean
gdk_macos_display_get_setting (GdkDisplay *display,
const gchar *setting,
const char *setting,
GValue *value)
{
return _gdk_macos_display_get_setting (GDK_MACOS_DISPLAY (display), setting, value);
@ -343,7 +343,7 @@ gdk_macos_display_load_display_link (GdkMacosDisplay *self)
g_source_attach (self->frame_source, NULL);
}
static const gchar *
static const char *
gdk_macos_display_get_name (GdkDisplay *display)
{
return GDK_MACOS_DISPLAY (display)->name;
@ -382,7 +382,7 @@ gdk_macos_display_has_pending (GdkDisplay *display)
static void
gdk_macos_display_notify_startup_complete (GdkDisplay *display,
const gchar *startup_notification_id)
const char *startup_notification_id)
{
/* Not Supported */
}
@ -677,7 +677,7 @@ gdk_macos_display_init (GdkMacosDisplay *self)
}
GdkDisplay *
_gdk_macos_display_open (const gchar *display_name)
_gdk_macos_display_open (const char *display_name)
{
static GdkMacosDisplay *self;
ProcessSerialNumber psn = { 0, kCurrentProcess };

View File

@ -152,7 +152,7 @@ GetLocalizedName (NSScreen *screen)
return g_steal_pointer (&name);
}
static gchar *
static char *
GetConnectorName (CGDirectDisplayID screen_id)
{
guint unit = CGDisplayUnitNumber (screen_id);
@ -193,8 +193,8 @@ _gdk_macos_monitor_reconfigure (GdkMacosMonitor *self)
CGRect bounds;
size_t width;
size_t pixel_width;
gchar *connector;
gchar *name;
char *connector;
char *name;
int refresh_rate;
int scale_factor = 1;
int width_mm;

View File

@ -79,7 +79,7 @@ NSWindow *_gdk_macos_surface_get_native (GdkMacosSurface
CGDirectDisplayID _gdk_macos_surface_get_screen_id (GdkMacosSurface *self);
const char *_gdk_macos_surface_get_title (GdkMacosSurface *self);
void _gdk_macos_surface_set_title (GdkMacosSurface *self,
const gchar *title);
const char *title);
void _gdk_macos_surface_get_shadow (GdkMacosSurface *self,
int *top,
int *right,

View File

@ -571,7 +571,7 @@ _gdk_macos_surface_get_title (GdkMacosSurface *self)
void
_gdk_macos_surface_set_title (GdkMacosSurface *self,
const gchar *title)
const char *title)
{
g_return_if_fail (GDK_IS_MACOS_SURFACE (self));

View File

@ -49,7 +49,7 @@ typedef struct _GdkWaylandAppLaunchContextClass GdkWaylandAppLaunchContextClass;
struct _GdkWaylandAppLaunchContext
{
GdkAppLaunchContext base;
gchar *name;
char *name;
guint serial;
};

View File

@ -62,7 +62,7 @@ _gdk_wayland_display_finalize_cursors (GdkWaylandDisplay *display)
}
static const struct {
const gchar *css_name, *traditional_name;
const char *css_name, *traditional_name;
} name_map[] = {
{ "default", "left_ptr" },
{ "help", "question_arrow" },
@ -101,8 +101,8 @@ static const struct {
{ "zoom-out", "left_ptr" }
};
static const gchar *
name_fallback (const gchar *name)
static const char *
name_fallback (const char *name)
{
int i;

View File

@ -161,7 +161,7 @@ struct _GdkWaylandTabletPadData
guint enter_serial;
uint32_t n_buttons;
gchar *path;
char *path;
GList *rings;
GList *strips;
@ -171,8 +171,8 @@ struct _GdkWaylandTabletPadData
struct _GdkWaylandTabletData
{
struct zwp_tablet_v2 *wp_tablet;
gchar *name;
gchar *path;
char *name;
char *path;
uint32_t vid;
uint32_t pid;
@ -2853,8 +2853,8 @@ tablet_handle_done (void *data,
GdkWaylandSeat *seat = GDK_WAYLAND_SEAT (tablet->seat);
GdkDisplay *display = gdk_seat_get_display (GDK_SEAT (seat));
GdkDevice *logical_device, *stylus_device;
gchar *logical_name;
gchar *vid, *pid;
char *logical_name;
char *vid, *pid;
vid = g_strdup_printf ("%.4x", tablet->vid);
pid = g_strdup_printf ("%.4x", tablet->pid);
@ -5077,7 +5077,7 @@ gdk_wayland_seat_get_wl_seat (GdkSeat *seat)
*
* Returns: the /dev/input/event* path of this device
**/
const gchar *
const char *
gdk_wayland_device_get_node_path (GdkDevice *device)
{
GdkWaylandTabletData *tablet;
@ -5113,7 +5113,7 @@ void
gdk_wayland_device_pad_set_feedback (GdkDevice *device,
GdkDevicePadFeature feature,
guint feature_idx,
const gchar *label)
const char *label)
{
GdkWaylandTabletPadData *pad;
GdkWaylandTabletPadGroupData *group;

View File

@ -610,7 +610,7 @@ _gdk_wayland_display_prepare_cursor_themes (GdkWaylandDisplay *display_wayland)
static void init_settings (GdkDisplay *display);
GdkDisplay *
_gdk_wayland_display_open (const gchar *display_name)
_gdk_wayland_display_open (const char *display_name)
{
struct wl_display *wl_display;
GdkDisplay *display;
@ -758,10 +758,10 @@ gdk_wayland_display_finalize (GObject *object)
G_OBJECT_CLASS (gdk_wayland_display_parent_class)->finalize (object);
}
static const gchar *
static const char *
gdk_wayland_display_get_name (GdkDisplay *display)
{
const gchar *name;
const char *name;
name = g_getenv ("WAYLAND_DISPLAY");
if (name == NULL)
@ -830,7 +830,7 @@ static void
gdk_wayland_display_make_default (GdkDisplay *display)
{
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
const gchar *startup_id;
const char *startup_id;
g_free (display_wayland->startup_notification_id);
display_wayland->startup_notification_id = NULL;
@ -870,7 +870,7 @@ gdk_wayland_display_get_next_serial (GdkDisplay *display)
*
* Returns: the startup notification ID for @display, or %NULL
*/
const gchar *
const char *
gdk_wayland_display_get_startup_notification_id (GdkDisplay *display)
{
return GDK_WAYLAND_DISPLAY (display)->startup_notification_id;
@ -903,10 +903,10 @@ gdk_wayland_display_set_startup_notification_id (GdkDisplay *display,
static void
gdk_wayland_display_notify_startup_complete (GdkDisplay *display,
const gchar *startup_id)
const char *startup_id)
{
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
gchar *free_this = NULL;
char *free_this = NULL;
if (startup_id == NULL)
{
@ -1071,7 +1071,7 @@ get_cursor_theme (GdkWaylandDisplay *display_wayland,
void
gdk_wayland_display_set_cursor_theme (GdkDisplay *display,
const gchar *name,
const char *name,
int size)
{
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY(display);
@ -1116,7 +1116,7 @@ static void
_gdk_wayland_display_load_cursor_theme (GdkWaylandDisplay *display_wayland)
{
guint size;
const gchar *name;
const char *name;
GValue v = G_VALUE_INIT;
gint64 before = g_get_monotonic_time ();
@ -1467,9 +1467,9 @@ get_dpi_from_gsettings (GdkWaylandDisplay *display_wayland)
typedef struct _TranslationEntry TranslationEntry;
struct _TranslationEntry {
gboolean valid;
const gchar *schema;
const gchar *key;
const gchar *setting;
const char *schema;
const char *key;
const char *setting;
GType type;
union {
const char *s;
@ -1994,7 +1994,7 @@ set_value_from_entry (GdkDisplay *display,
case G_TYPE_STRING:
if (settings && entry->valid)
{
gchar *s;
char *s;
s = g_settings_get_string (settings, entry->key);
g_value_set_string (value, s);
g_free (s);
@ -2053,7 +2053,7 @@ set_decoration_layout_from_entry (GdkDisplay *display,
if (settings)
{
gchar *s = g_settings_get_string (settings, entry->key);
char *s = g_settings_get_string (settings, entry->key);
translate_wm_button_layout_to_gtk (s);
g_value_set_string (value, s);
@ -2585,11 +2585,11 @@ gdk_wayland_display_get_output_scale (GdkWaylandDisplay *display_wayland,
**/
gboolean
gdk_wayland_display_query_registry (GdkDisplay *display,
const gchar *global)
const char *global)
{
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
GHashTableIter iter;
gchar *value;
char *value;
g_return_val_if_fail (GDK_IS_WAYLAND_DISPLAY (display), FALSE);
g_return_val_if_fail (global != NULL, FALSE);

View File

@ -59,8 +59,8 @@ typedef struct {
gboolean antialias;
gboolean hinting;
int dpi;
const gchar *rgba;
const gchar *hintstyle;
const char *rgba;
const char *hintstyle;
} GsdXftSettings;
typedef enum _GdkWaylandShellVariant
@ -81,7 +81,7 @@ struct _GdkWaylandDisplay
guint32 shell_capabilities;
/* Startup notification */
gchar *startup_notification_id;
char *startup_notification_id;
/* Most recent serial */
guint32 serial;
@ -127,7 +127,7 @@ struct _GdkWaylandDisplay
GList *current_grabbing_popups;
struct wl_cursor_theme *cursor_theme;
gchar *cursor_theme_name;
char *cursor_theme_name;
int cursor_theme_size;
GHashTable *cursor_surface_cache;

Some files were not shown because too many files have changed in this diff Show More