mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-09 10:20:07 +00:00
Replace "gint" with "int"
This commit is contained in:
parent
46423e614d
commit
d7266b25ba
@ -81,11 +81,11 @@ constraint_editor_application_activate (GApplication *app)
|
||||
static void
|
||||
constraint_editor_application_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
int n_files,
|
||||
const gchar *hint)
|
||||
{
|
||||
ConstraintEditorWindow *win;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_files; i++)
|
||||
{
|
||||
|
@ -193,7 +193,7 @@ constraint_editor_window_load (ConstraintEditorWindow *self,
|
||||
|
||||
static void
|
||||
open_response_cb (GtkNativeDialog *dialog,
|
||||
gint response,
|
||||
int response,
|
||||
ConstraintEditorWindow *self)
|
||||
{
|
||||
gtk_native_dialog_hide (dialog);
|
||||
@ -285,7 +285,7 @@ serialize_model (GListModel *list)
|
||||
|
||||
static void
|
||||
save_response_cb (GtkNativeDialog *dialog,
|
||||
gint response,
|
||||
int response,
|
||||
ConstraintEditorWindow *self)
|
||||
{
|
||||
gtk_native_dialog_hide (dialog);
|
||||
|
@ -92,7 +92,7 @@ activate_new (GSimpleAction *action,
|
||||
|
||||
static void
|
||||
open_response_cb (GtkNativeDialog *dialog,
|
||||
gint response_id,
|
||||
int response_id,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkFileChooserNative *native = user_data;
|
||||
@ -245,8 +245,8 @@ update_statusbar (GtkTextBuffer *buffer,
|
||||
DemoApplicationWindow *window)
|
||||
{
|
||||
gchar *msg;
|
||||
gint row, col;
|
||||
gint count;
|
||||
int row, col;
|
||||
int count;
|
||||
GtkTextIter iter;
|
||||
|
||||
/* clear any previous message, underflow is allowed */
|
||||
|
@ -47,7 +47,7 @@ on_assistant_close_cancel (GtkWidget *widget, gpointer data)
|
||||
static void
|
||||
on_assistant_prepare (GtkWidget *widget, GtkWidget *page, gpointer data)
|
||||
{
|
||||
gint current_page, n_pages;
|
||||
int current_page, n_pages;
|
||||
gchar *title;
|
||||
|
||||
current_page = gtk_assistant_get_current_page (GTK_ASSISTANT (widget));
|
||||
@ -70,7 +70,7 @@ on_entry_changed (GtkWidget *widget, gpointer data)
|
||||
{
|
||||
GtkAssistant *assistant = GTK_ASSISTANT (data);
|
||||
GtkWidget *current_page;
|
||||
gint page_number;
|
||||
int page_number;
|
||||
const gchar *text;
|
||||
|
||||
page_number = gtk_assistant_get_current_page (assistant);
|
||||
|
@ -38,7 +38,7 @@ create_icon_store (void)
|
||||
|
||||
GtkTreeIter iter;
|
||||
GtkListStore *store;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING);
|
||||
|
||||
@ -77,7 +77,7 @@ set_sensitive (GtkCellLayout *cell_layout,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreePath *path;
|
||||
gint *indices;
|
||||
int *indices;
|
||||
gboolean sensitive;
|
||||
|
||||
path = gtk_tree_model_get_path (tree_model, iter);
|
||||
@ -175,7 +175,7 @@ create_capital_store (void)
|
||||
|
||||
GtkTreeIter iter, iter2;
|
||||
GtkTreeStore *store;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
store = gtk_tree_store_new (1, G_TYPE_STRING);
|
||||
|
||||
|
@ -75,7 +75,7 @@ setup_listbox (GtkBuilder *builder,
|
||||
{
|
||||
GtkWidget *normal_row;
|
||||
GtkWidget *listbox;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
normal_row = NULL;
|
||||
listbox = gtk_list_box_new ();
|
||||
|
@ -16,7 +16,7 @@ message_dialog_clicked (GtkButton *button,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
static gint i = 1;
|
||||
static int i = 1;
|
||||
|
||||
dialog = gtk_message_dialog_new (GTK_WINDOW (window),
|
||||
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
|
||||
|
@ -16,9 +16,9 @@
|
||||
|
||||
typedef struct
|
||||
{
|
||||
gint number;
|
||||
int number;
|
||||
gchar *product;
|
||||
gint yummy;
|
||||
int yummy;
|
||||
}
|
||||
Item;
|
||||
|
||||
@ -74,7 +74,7 @@ add_items (void)
|
||||
static GtkTreeModel *
|
||||
create_items_model (void)
|
||||
{
|
||||
gint i = 0;
|
||||
int i = 0;
|
||||
GtkListStore *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
@ -109,7 +109,7 @@ static GtkTreeModel *
|
||||
create_numbers_model (void)
|
||||
{
|
||||
#define N_NUMBERS 10
|
||||
gint i = 0;
|
||||
int i = 0;
|
||||
GtkListStore *model;
|
||||
GtkTreeIter iter;
|
||||
|
||||
@ -192,7 +192,7 @@ remove_item (GtkWidget *widget, gpointer data)
|
||||
|
||||
if (gtk_tree_selection_get_selected (selection, NULL, &iter))
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
GtkTreePath *path;
|
||||
|
||||
path = gtk_tree_model_get_path (model, &iter);
|
||||
@ -211,7 +211,7 @@ separator_row (GtkTreeModel *model,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreePath *path;
|
||||
gint idx;
|
||||
int idx;
|
||||
|
||||
path = gtk_tree_model_get_path (model, iter);
|
||||
idx = gtk_tree_path_get_indices (path)[0];
|
||||
@ -241,7 +241,7 @@ cell_edited (GtkCellRendererText *cell,
|
||||
GtkTreePath *path = gtk_tree_path_new_from_string (path_string);
|
||||
GtkTreeIter iter;
|
||||
|
||||
gint column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column"));
|
||||
int column = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (cell), "column"));
|
||||
|
||||
gtk_tree_model_get_iter (model, &iter, path);
|
||||
|
||||
@ -249,7 +249,7 @@ cell_edited (GtkCellRendererText *cell,
|
||||
{
|
||||
case COLUMN_ITEM_NUMBER:
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
i = gtk_tree_path_get_indices (path)[0];
|
||||
g_array_index (articles, Item, i).number = atoi (new_text);
|
||||
@ -261,7 +261,7 @@ cell_edited (GtkCellRendererText *cell,
|
||||
|
||||
case COLUMN_ITEM_PRODUCT:
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
gchar *old_text;
|
||||
|
||||
gtk_tree_model_get (model, &iter, column, &old_text, -1);
|
||||
|
@ -13,7 +13,7 @@
|
||||
static GtkWidget *window = NULL;
|
||||
|
||||
static void
|
||||
response_cb (GtkDialog *dialog, gint response_id)
|
||||
response_cb (GtkDialog *dialog, int response_id)
|
||||
{
|
||||
gtk_window_destroy (GTK_WINDOW (window));
|
||||
window = NULL;
|
||||
|
@ -22,7 +22,7 @@ format_number (GtkTreeViewColumn *col,
|
||||
GtkTreeIter *iter,
|
||||
gpointer data)
|
||||
{
|
||||
gint num;
|
||||
int num;
|
||||
gchar *text;
|
||||
|
||||
gtk_tree_model_get (model, iter, GPOINTER_TO_INT (data), &num, -1);
|
||||
@ -35,11 +35,11 @@ static void
|
||||
filter_modify_func (GtkTreeModel *model,
|
||||
GtkTreeIter *iter,
|
||||
GValue *value,
|
||||
gint column,
|
||||
int column,
|
||||
gpointer data)
|
||||
{
|
||||
GtkTreeModelFilter *filter_model = GTK_TREE_MODEL_FILTER (model);
|
||||
gint width, height;
|
||||
int width, height;
|
||||
GtkTreeModel *child_model;
|
||||
GtkTreeIter child_iter;
|
||||
|
||||
@ -75,7 +75,7 @@ visible_func (GtkTreeModel *model,
|
||||
GtkTreeIter *iter,
|
||||
gpointer data)
|
||||
{
|
||||
gint width;
|
||||
int width;
|
||||
|
||||
gtk_tree_model_get (model, iter,
|
||||
WIDTH_COLUMN, &width,
|
||||
|
@ -716,7 +716,7 @@ do_flowbox (GtkWidget *do_widget)
|
||||
"YellowGreen",
|
||||
NULL
|
||||
};
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
if (!window)
|
||||
{
|
||||
|
@ -295,7 +295,7 @@ update_display (void)
|
||||
GList *l;
|
||||
PangoAttrList *attrs;
|
||||
PangoAttribute *attr;
|
||||
gint ins, bound;
|
||||
int ins, bound;
|
||||
guint start, end;
|
||||
PangoLanguage *lang;
|
||||
char *font_desc;
|
||||
@ -479,7 +479,7 @@ update_script_combo (void)
|
||||
{
|
||||
GtkListStore *store;
|
||||
hb_font_t *hb_font;
|
||||
gint i, j, k;
|
||||
int i, j, k;
|
||||
PangoFont *pango_font;
|
||||
GHashTable *tags;
|
||||
GHashTableIter iter;
|
||||
@ -593,7 +593,7 @@ update_script_combo (void)
|
||||
static void
|
||||
update_features (void)
|
||||
{
|
||||
gint i, j;
|
||||
int i, j;
|
||||
GtkTreeModel *model;
|
||||
GtkTreeIter iter;
|
||||
guint script_index, lang_index;
|
||||
|
@ -36,11 +36,11 @@ adjustment_get_normalized_value (GtkAdjustment *adj)
|
||||
|
||||
static void
|
||||
val_to_xy (GtkFontPlane *plane,
|
||||
gint *x,
|
||||
gint *y)
|
||||
int *x,
|
||||
int *y)
|
||||
{
|
||||
gdouble u, v;
|
||||
gint width, height;
|
||||
int width, height;
|
||||
|
||||
width = gtk_widget_get_allocated_width (GTK_WIDGET (plane));
|
||||
height = gtk_widget_get_allocated_height (GTK_WIDGET (plane));
|
||||
@ -57,8 +57,8 @@ plane_snapshot (GtkWidget *widget,
|
||||
GtkSnapshot *snapshot)
|
||||
{
|
||||
GtkFontPlane *plane = GTK_FONT_PLANE (widget);
|
||||
gint x, y;
|
||||
gint width, height;
|
||||
int x, y;
|
||||
int width, height;
|
||||
cairo_t *cr;
|
||||
|
||||
val_to_xy (plane, &x, &y);
|
||||
@ -125,8 +125,8 @@ adjustment_set_normalized_value (GtkAdjustment *adj,
|
||||
|
||||
static void
|
||||
update_value (GtkFontPlane *plane,
|
||||
gint x,
|
||||
gint y)
|
||||
int x,
|
||||
int y)
|
||||
{
|
||||
GtkWidget *widget = GTK_WIDGET (plane);
|
||||
gdouble u, v;
|
||||
|
@ -98,7 +98,7 @@ gtk_fishbowl_measure (GtkWidget *widget,
|
||||
GHashTableIter iter;
|
||||
gpointer key, value;
|
||||
GtkFishbowlChild *child;
|
||||
gint child_min, child_nat;
|
||||
int child_min, child_nat;
|
||||
|
||||
*minimum = 0;
|
||||
*natural = 0;
|
||||
|
@ -18,7 +18,7 @@ static void
|
||||
insert_link (GtkTextBuffer *buffer,
|
||||
GtkTextIter *iter,
|
||||
const char *text,
|
||||
gint page)
|
||||
int page)
|
||||
{
|
||||
GtkTextTag *tag;
|
||||
|
||||
@ -35,7 +35,7 @@ insert_link (GtkTextBuffer *buffer,
|
||||
*/
|
||||
static void
|
||||
show_page (GtkTextBuffer *buffer,
|
||||
gint page)
|
||||
int page)
|
||||
{
|
||||
GtkTextIter iter;
|
||||
|
||||
@ -91,7 +91,7 @@ follow_if_link (GtkWidget *text_view,
|
||||
for (tagp = tags; tagp != NULL; tagp = tagp->next)
|
||||
{
|
||||
GtkTextTag *tag = tagp->data;
|
||||
gint page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page"));
|
||||
int page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page"));
|
||||
|
||||
if (page != 0)
|
||||
{
|
||||
@ -134,8 +134,8 @@ key_pressed (GtkEventController *controller,
|
||||
}
|
||||
|
||||
static void set_cursor_if_appropriate (GtkTextView *text_view,
|
||||
gint x,
|
||||
gint y);
|
||||
int x,
|
||||
int y);
|
||||
|
||||
static void
|
||||
released_cb (GtkGestureClick *gesture,
|
||||
@ -183,8 +183,8 @@ static gboolean hovering_over_link = FALSE;
|
||||
*/
|
||||
static void
|
||||
set_cursor_if_appropriate (GtkTextView *text_view,
|
||||
gint x,
|
||||
gint y)
|
||||
int x,
|
||||
int y)
|
||||
{
|
||||
GSList *tags = NULL, *tagp = NULL;
|
||||
GtkTextIter iter;
|
||||
@ -196,7 +196,7 @@ set_cursor_if_appropriate (GtkTextView *text_view,
|
||||
for (tagp = tags; tagp != NULL; tagp = tagp->next)
|
||||
{
|
||||
GtkTextTag *tag = tagp->data;
|
||||
gint page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page"));
|
||||
int page = GPOINTER_TO_INT (g_object_get_data (G_OBJECT (tag), "page"));
|
||||
|
||||
if (page != 0)
|
||||
{
|
||||
|
@ -90,7 +90,7 @@ fill_store (GtkListStore *store)
|
||||
g_dir_close (dir);
|
||||
}
|
||||
|
||||
static gint
|
||||
static int
|
||||
sort_func (GtkTreeModel *model,
|
||||
GtkTreeIter *a,
|
||||
GtkTreeIter *b,
|
||||
|
@ -20,7 +20,7 @@ fill_store (GtkListStore *store)
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
const gchar *text[] = { "Red", "Green", "Blue", "Yellow" };
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
/* First clear the store */
|
||||
gtk_list_store_clear (store);
|
||||
@ -60,10 +60,10 @@ set_cell_color (GtkCellLayout *cell_layout,
|
||||
|
||||
if (gdk_rgba_parse (&color, text))
|
||||
pixel =
|
||||
((gint)(color.red * 255)) << 24 |
|
||||
((gint)(color.green * 255)) << 16 |
|
||||
((gint)(color.blue * 255)) << 8 |
|
||||
((gint)(color.alpha * 255));
|
||||
((int)(color.red * 255)) << 24 |
|
||||
((int)(color.green * 255)) << 16 |
|
||||
((int)(color.blue * 255)) << 8 |
|
||||
((int)(color.alpha * 255));
|
||||
|
||||
g_free (text);
|
||||
|
||||
|
@ -43,10 +43,10 @@ progressive_prepared_callback (GdkPixbufLoader *loader,
|
||||
|
||||
static void
|
||||
progressive_updated_callback (GdkPixbufLoader *loader,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height,
|
||||
gpointer data)
|
||||
{
|
||||
GtkWidget *picture;
|
||||
@ -58,7 +58,7 @@ progressive_updated_callback (GdkPixbufLoader *loader,
|
||||
gtk_picture_set_pixbuf (GTK_PICTURE (picture), pixbuf);
|
||||
}
|
||||
|
||||
static gint
|
||||
static int
|
||||
progressive_timeout (gpointer data)
|
||||
{
|
||||
GtkWidget *picture;
|
||||
|
@ -8,7 +8,7 @@
|
||||
|
||||
static void
|
||||
on_bar_response (GtkInfoBar *info_bar,
|
||||
gint response_id,
|
||||
int response_id,
|
||||
gpointer user_data)
|
||||
{
|
||||
GtkWidget *dialog;
|
||||
|
@ -9,7 +9,7 @@
|
||||
|
||||
static void
|
||||
response_cb (GtkWidget *dialog,
|
||||
gint response_id,
|
||||
int response_id,
|
||||
gpointer data)
|
||||
{
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
|
@ -81,7 +81,7 @@ spinner_timeout (gpointer data)
|
||||
static GtkTreeModel *
|
||||
create_model (void)
|
||||
{
|
||||
gint i = 0;
|
||||
int i = 0;
|
||||
GtkListStore *store;
|
||||
GtkTreeIter iter;
|
||||
|
||||
|
@ -252,7 +252,6 @@ static const char *types[] =
|
||||
"static",
|
||||
"const ",
|
||||
"void",
|
||||
"gint",
|
||||
" int ",
|
||||
" char ",
|
||||
"gchar ",
|
||||
@ -387,11 +386,11 @@ static const char *control[] =
|
||||
void
|
||||
parse_chars (gchar *text,
|
||||
gchar **end_ptr,
|
||||
gint *state,
|
||||
int *state,
|
||||
const char **tag,
|
||||
gboolean start)
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
gchar *next_token;
|
||||
|
||||
/* Handle comments first */
|
||||
@ -462,7 +461,7 @@ parse_chars (gchar *text,
|
||||
/* check for string */
|
||||
if (text[0] == '"')
|
||||
{
|
||||
gint maybe_escape = FALSE;
|
||||
int maybe_escape = FALSE;
|
||||
|
||||
*end_ptr = text + 1;
|
||||
*tag = "string";
|
||||
@ -525,7 +524,7 @@ void
|
||||
fontify (GtkTextBuffer *source_buffer)
|
||||
{
|
||||
GtkTextIter start_iter, next_iter, tmp_iter;
|
||||
gint state;
|
||||
int state;
|
||||
gchar *text;
|
||||
gchar *start_ptr, *end_ptr;
|
||||
const char *tag;
|
||||
@ -742,7 +741,7 @@ add_data_tab (const gchar *demoname)
|
||||
static void
|
||||
remove_data_tabs (void)
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
for (i = gtk_notebook_get_n_pages (GTK_NOTEBOOK (notebook)) - 1; i > 1; i--)
|
||||
gtk_notebook_remove_page (GTK_NOTEBOOK (notebook), i);
|
||||
@ -760,7 +759,7 @@ load_file (const gchar *demoname,
|
||||
gboolean in_para = 0;
|
||||
gchar **lines;
|
||||
GBytes *bytes;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
if (!g_strcmp0 (current_file, filename))
|
||||
return;
|
||||
@ -1190,7 +1189,7 @@ list_demos (void)
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
static int
|
||||
command_line (GApplication *app,
|
||||
GApplicationCommandLine *cmdline)
|
||||
{
|
||||
|
@ -12,9 +12,9 @@ static void
|
||||
margin_changed (GtkAdjustment *adjustment,
|
||||
GtkTextView *text)
|
||||
{
|
||||
gint value;
|
||||
int value;
|
||||
|
||||
value = (gint)gtk_adjustment_get_value (adjustment);
|
||||
value = (int)gtk_adjustment_get_value (adjustment);
|
||||
gtk_text_view_set_left_margin (GTK_TEXT_VIEW (text), value);
|
||||
g_object_set (tag, "pixels-above-lines", value, NULL);
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
#include <gtk/gtkunixprint.h>
|
||||
|
||||
static void
|
||||
done_cb (GtkDialog *dialog, gint response, gpointer data)
|
||||
done_cb (GtkDialog *dialog, int response, gpointer data)
|
||||
{
|
||||
gtk_window_destroy (GTK_WINDOW (dialog));
|
||||
}
|
||||
|
@ -55,8 +55,8 @@ static void drawing_area_set_color (DrawingArea *area,
|
||||
|
||||
static void
|
||||
drawing_area_ensure_surface (DrawingArea *area,
|
||||
gint width,
|
||||
gint height)
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
if (!area->surface ||
|
||||
cairo_image_surface_get_width (area->surface) != width ||
|
||||
@ -195,7 +195,7 @@ drawing_area_root (GtkWidget *widget)
|
||||
GSimpleActionGroup *action_group;
|
||||
GSimpleAction *action;
|
||||
GtkWidget *toplevel;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
GTK_WIDGET_CLASS (drawing_area_parent_class)->root (widget);
|
||||
|
||||
|
@ -39,7 +39,7 @@ static GdkPixbuf *frame;
|
||||
|
||||
/* Background image */
|
||||
static GdkPixbuf *background;
|
||||
static gint back_width, back_height;
|
||||
static int back_width, back_height;
|
||||
|
||||
/* Images */
|
||||
static GdkPixbuf *images[N_IMAGES];
|
||||
@ -51,7 +51,7 @@ static GtkWidget *da;
|
||||
static gboolean
|
||||
load_pixbufs (GError **error)
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
if (background)
|
||||
return TRUE; /* already loaded earlier */
|
||||
|
@ -17,10 +17,10 @@ typedef struct
|
||||
gchar *resourcename;
|
||||
gdouble font_size;
|
||||
|
||||
gint lines_per_page;
|
||||
int lines_per_page;
|
||||
gchar **lines;
|
||||
gint num_lines;
|
||||
gint num_pages;
|
||||
int num_lines;
|
||||
int num_pages;
|
||||
} PrintData;
|
||||
|
||||
static void
|
||||
@ -55,15 +55,15 @@ begin_print (GtkPrintOperation *operation,
|
||||
static void
|
||||
draw_page (GtkPrintOperation *operation,
|
||||
GtkPrintContext *context,
|
||||
gint page_nr,
|
||||
int page_nr,
|
||||
gpointer user_data)
|
||||
{
|
||||
PrintData *data = (PrintData *)user_data;
|
||||
cairo_t *cr;
|
||||
PangoLayout *layout;
|
||||
gint text_width, text_height;
|
||||
int text_width, text_height;
|
||||
gdouble width;
|
||||
gint line, i;
|
||||
int line, i;
|
||||
PangoFontDescription *desc;
|
||||
gchar *page_str;
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
static gint count = 0;
|
||||
static int count = 0;
|
||||
static guint timeout = 0;
|
||||
|
||||
static void
|
||||
|
@ -123,7 +123,7 @@ set_search_by (GSimpleAction *action,
|
||||
|
||||
static void
|
||||
icon_press_cb (GtkEntry *entry,
|
||||
gint position,
|
||||
int position,
|
||||
gpointer data)
|
||||
{
|
||||
if (position == GTK_ENTRY_ICON_PRIMARY)
|
||||
|
@ -11,7 +11,7 @@
|
||||
#include <math.h>
|
||||
#include <stdlib.h>
|
||||
|
||||
gint
|
||||
int
|
||||
spinbutton_hex_spin_input (GtkSpinButton *spin_button,
|
||||
gdouble *new_val)
|
||||
{
|
||||
@ -28,7 +28,7 @@ spinbutton_hex_spin_input (GtkSpinButton *spin_button,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gint
|
||||
int
|
||||
spinbutton_hex_spin_output (GtkSpinButton *spin_button)
|
||||
{
|
||||
GtkAdjustment *adjustment;
|
||||
@ -40,7 +40,7 @@ spinbutton_hex_spin_output (GtkSpinButton *spin_button)
|
||||
if (fabs (val) < 1e-5)
|
||||
buf = g_strdup ("0x00");
|
||||
else
|
||||
buf = g_strdup_printf ("0x%.2X", (gint) val);
|
||||
buf = g_strdup_printf ("0x%.2X", (int) val);
|
||||
if (strcmp (buf, gtk_editable_get_text (GTK_EDITABLE (spin_button))))
|
||||
gtk_editable_set_text (GTK_EDITABLE (spin_button), buf);
|
||||
g_free (buf);
|
||||
@ -48,15 +48,15 @@ spinbutton_hex_spin_output (GtkSpinButton *spin_button)
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gint
|
||||
int
|
||||
spinbutton_time_spin_input (GtkSpinButton *spin_button,
|
||||
gdouble *new_val)
|
||||
{
|
||||
const gchar *text;
|
||||
gchar **str;
|
||||
gboolean found = FALSE;
|
||||
gint hours;
|
||||
gint minutes;
|
||||
int hours;
|
||||
int minutes;
|
||||
gchar *endh;
|
||||
gchar *endm;
|
||||
|
||||
@ -87,7 +87,7 @@ spinbutton_time_spin_input (GtkSpinButton *spin_button,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gint
|
||||
int
|
||||
spinbutton_time_spin_output (GtkSpinButton *spin_button)
|
||||
{
|
||||
GtkAdjustment *adjustment;
|
||||
@ -121,11 +121,11 @@ static const char *month[12] = {
|
||||
"December"
|
||||
};
|
||||
|
||||
gint
|
||||
int
|
||||
spinbutton_month_spin_input (GtkSpinButton *spin_button,
|
||||
gdouble *new_val)
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
gchar *tmp1, *tmp2;
|
||||
gboolean found = FALSE;
|
||||
|
||||
@ -150,12 +150,12 @@ spinbutton_month_spin_input (GtkSpinButton *spin_button,
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
gint
|
||||
int
|
||||
spinbutton_month_spin_output (GtkSpinButton *spin_button)
|
||||
{
|
||||
GtkAdjustment *adjustment;
|
||||
gdouble value;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
adjustment = gtk_spin_button_get_adjustment (spin_button);
|
||||
value = gtk_adjustment_get_value (adjustment);
|
||||
|
@ -230,7 +230,7 @@ item_toggled (GtkCellRendererToggle *cell,
|
||||
GtkTreeIter iter;
|
||||
gboolean toggle_item;
|
||||
|
||||
gint *column;
|
||||
int *column;
|
||||
|
||||
column = g_object_get_data (G_OBJECT (cell), "column");
|
||||
|
||||
@ -252,7 +252,7 @@ item_toggled (GtkCellRendererToggle *cell,
|
||||
static void
|
||||
add_columns (GtkTreeView *treeview)
|
||||
{
|
||||
gint col_offset;
|
||||
int col_offset;
|
||||
GtkCellRenderer *renderer;
|
||||
GtkTreeViewColumn *column;
|
||||
GtkTreeModel *model = gtk_tree_view_get_model (treeview);
|
||||
@ -272,7 +272,7 @@ add_columns (GtkTreeView *treeview)
|
||||
/* alex column */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)ALEX_COLUMN);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (int *)ALEX_COLUMN);
|
||||
|
||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||
|
||||
@ -294,7 +294,7 @@ add_columns (GtkTreeView *treeview)
|
||||
/* havoc column */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)HAVOC_COLUMN);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (int *)HAVOC_COLUMN);
|
||||
|
||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||
|
||||
@ -315,7 +315,7 @@ add_columns (GtkTreeView *treeview)
|
||||
/* tim column */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)TIM_COLUMN);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (int *)TIM_COLUMN);
|
||||
|
||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||
|
||||
@ -337,7 +337,7 @@ add_columns (GtkTreeView *treeview)
|
||||
/* owen column */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)OWEN_COLUMN);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (int *)OWEN_COLUMN);
|
||||
|
||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||
|
||||
@ -358,7 +358,7 @@ add_columns (GtkTreeView *treeview)
|
||||
/* dave column */
|
||||
renderer = gtk_cell_renderer_toggle_new ();
|
||||
g_object_set (renderer, "xalign", 0.0, NULL);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (gint *)DAVE_COLUMN);
|
||||
g_object_set_data (G_OBJECT (renderer), "column", (int *)DAVE_COLUMN);
|
||||
|
||||
g_signal_connect (renderer, "toggled", G_CALLBACK (item_toggled), model);
|
||||
|
||||
|
@ -161,7 +161,7 @@ copy_to_clipboard (GtkButton *button,
|
||||
}
|
||||
|
||||
static void
|
||||
set_image (GtkWidget *image, const gchar *name, gint size)
|
||||
set_image (GtkWidget *image, const gchar *name, int size)
|
||||
{
|
||||
gtk_image_set_from_icon_name (GTK_IMAGE (image), name);
|
||||
gtk_image_set_pixel_size (GTK_IMAGE (image), size);
|
||||
|
@ -199,11 +199,11 @@ node_editor_application_activate (GApplication *app)
|
||||
static void
|
||||
node_editor_application_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
int n_files,
|
||||
const gchar *hint)
|
||||
{
|
||||
NodeEditorWindow *win;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_files; i++)
|
||||
{
|
||||
|
@ -288,14 +288,14 @@ text_view_query_tooltip_cb (GtkWidget *widget,
|
||||
|
||||
if (keyboard_tip)
|
||||
{
|
||||
gint offset;
|
||||
int offset;
|
||||
|
||||
g_object_get (self->text_buffer, "cursor-position", &offset, NULL);
|
||||
gtk_text_buffer_get_iter_at_offset (self->text_buffer, &iter, offset);
|
||||
}
|
||||
else
|
||||
{
|
||||
gint bx, by, trailing;
|
||||
int bx, by, trailing;
|
||||
|
||||
gtk_text_view_window_to_buffer_coords (GTK_TEXT_VIEW (self->text_view), GTK_TEXT_WINDOW_TEXT,
|
||||
x, y, &bx, &by);
|
||||
@ -399,7 +399,7 @@ node_editor_window_load (NodeEditorWindow *self,
|
||||
|
||||
static void
|
||||
open_response_cb (GtkWidget *dialog,
|
||||
gint response,
|
||||
int response,
|
||||
NodeEditorWindow *self)
|
||||
{
|
||||
gtk_widget_hide (dialog);
|
||||
@ -448,7 +448,7 @@ open_cb (GtkWidget *button,
|
||||
|
||||
static void
|
||||
save_response_cb (GtkWidget *dialog,
|
||||
gint response,
|
||||
int response,
|
||||
NodeEditorWindow *self)
|
||||
{
|
||||
gtk_widget_hide (dialog);
|
||||
@ -577,7 +577,7 @@ create_cairo_texture (NodeEditorWindow *self)
|
||||
|
||||
static void
|
||||
export_image_response_cb (GtkWidget *dialog,
|
||||
gint response,
|
||||
int response,
|
||||
GdkTexture *texture)
|
||||
{
|
||||
gtk_widget_hide (dialog);
|
||||
|
@ -34,7 +34,7 @@ static void
|
||||
update_statusbar (void)
|
||||
{
|
||||
gchar *msg;
|
||||
gint row, col;
|
||||
int row, col;
|
||||
GtkTextIter iter;
|
||||
const char *print_str;
|
||||
|
||||
|
@ -139,9 +139,9 @@ get_busy (GSimpleAction *action,
|
||||
gtk_widget_set_sensitive (window, FALSE);
|
||||
}
|
||||
|
||||
static gint current_page = 0;
|
||||
static int current_page = 0;
|
||||
static gboolean
|
||||
on_page (gint i)
|
||||
on_page (int i)
|
||||
{
|
||||
return current_page == i;
|
||||
}
|
||||
@ -422,7 +422,7 @@ static void
|
||||
spin_value_changed (GtkAdjustment *adjustment, GtkWidget *label)
|
||||
{
|
||||
GtkWidget *w;
|
||||
gint v;
|
||||
int v;
|
||||
gchar *text;
|
||||
|
||||
v = (int)gtk_adjustment_get_value (adjustment);
|
||||
@ -454,8 +454,8 @@ spin_value_reset (GtkWidget *button, GtkAdjustment *adjustment)
|
||||
dismiss (button);
|
||||
}
|
||||
|
||||
static gint pulse_time = 250;
|
||||
static gint pulse_entry_mode = 0;
|
||||
static int pulse_time = 250;
|
||||
static int pulse_entry_mode = 0;
|
||||
|
||||
static void
|
||||
remove_pulse (gpointer pulse_id)
|
||||
@ -557,9 +557,9 @@ on_scale_button_value_changed (GtkScaleButton *button,
|
||||
}
|
||||
else
|
||||
{
|
||||
gint percent;
|
||||
int percent;
|
||||
|
||||
percent = (gint) (100. * val / (gtk_adjustment_get_upper (adjustment) - gtk_adjustment_get_lower (adjustment)) + .5);
|
||||
percent = (int) (100. * val / (gtk_adjustment_get_upper (adjustment) - gtk_adjustment_get_lower (adjustment)) + .5);
|
||||
|
||||
str = g_strdup_printf (C_("volume percentage", "%d %%"), percent);
|
||||
}
|
||||
@ -627,7 +627,7 @@ static void
|
||||
on_range_from_changed (GtkSpinButton *from)
|
||||
{
|
||||
GtkSpinButton *to;
|
||||
gint v1, v2;
|
||||
int v1, v2;
|
||||
|
||||
to = GTK_SPIN_BUTTON (g_object_get_data (G_OBJECT (from), "range_to_spin"));
|
||||
|
||||
@ -642,7 +642,7 @@ static void
|
||||
on_range_to_changed (GtkSpinButton *to)
|
||||
{
|
||||
GtkSpinButton *from;
|
||||
gint v1, v2;
|
||||
int v1, v2;
|
||||
|
||||
from = GTK_SPIN_BUTTON (g_object_get_data (G_OBJECT (to), "range_from_spin"));
|
||||
|
||||
@ -654,7 +654,7 @@ on_range_to_changed (GtkSpinButton *to)
|
||||
}
|
||||
|
||||
static void
|
||||
info_bar_response (GtkWidget *infobar, gint response_id)
|
||||
info_bar_response (GtkWidget *infobar, int response_id)
|
||||
{
|
||||
if (response_id == GTK_RESPONSE_CLOSE)
|
||||
gtk_widget_hide (infobar);
|
||||
@ -1025,7 +1025,7 @@ populate_colors (GtkWidget *widget, GtkWidget *chooser)
|
||||
{ "7.5", "#C48299", NULL },
|
||||
{ "10", "#C68292", NULL }
|
||||
};
|
||||
gint i;
|
||||
int i;
|
||||
GtkWidget *row, *box, *label, *swatch;
|
||||
GtkWidget *sw;
|
||||
GdkRGBA rgba;
|
||||
@ -1331,7 +1331,7 @@ my_text_view_set_adjustment (MyTextView *tv, GtkAdjustment *adjustment)
|
||||
}
|
||||
|
||||
static void
|
||||
close_selection_dialog (GtkWidget *dialog, gint response, GtkWidget *tv)
|
||||
close_selection_dialog (GtkWidget *dialog, int response, GtkWidget *tv)
|
||||
{
|
||||
GtkWidget *box;
|
||||
GtkWidget *child;
|
||||
@ -1886,7 +1886,7 @@ activate (GApplication *app)
|
||||
{ "app.paste", { "<Control>v", NULL } },
|
||||
{ "win.delete", { "Delete", NULL } },
|
||||
};
|
||||
gint i;
|
||||
int i;
|
||||
GPermission *permission;
|
||||
GAction *action;
|
||||
GError *error = NULL;
|
||||
@ -2282,7 +2282,7 @@ main (int argc, char *argv[])
|
||||
{ "check-off-disabled", NULL, NULL, "false", NULL },
|
||||
{ "radio-x-disabled", NULL, "s", "'x'", NULL },
|
||||
};
|
||||
gint status;
|
||||
int status;
|
||||
|
||||
app = gtk_application_new ("org.gtk.WidgetFactory4", G_APPLICATION_NON_UNIQUE);
|
||||
|
||||
|
@ -486,7 +486,7 @@ It is also possible to align the columns to the next tab:
|
||||
void gtk_type_set_prop (GtkType *type,
|
||||
gfloat value);
|
||||
gfloat gtk_type_get_prop (GtkType *type);
|
||||
gint gtk_type_update_foobar (GtkType *type);
|
||||
int gtk_type_update_foobar (GtkType *type);
|
||||
```
|
||||
|
||||
Public headers should never be included directly:
|
||||
|
@ -797,7 +797,7 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
int n_files,
|
||||
const gchar *hint)
|
||||
{
|
||||
GList *windows;
|
||||
|
@ -141,8 +141,8 @@ take_window_shot (Window child,
|
||||
XWindowAttributes attrs;
|
||||
Window xid;
|
||||
Display *dpy;
|
||||
gint x = 0, y = 0;
|
||||
gint width, height;
|
||||
int x = 0, y = 0;
|
||||
int width, height;
|
||||
|
||||
GdkPixbuf *tmp, *tmp2;
|
||||
GdkPixbuf *retval = NULL;
|
||||
|
@ -27,7 +27,7 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
int n_files,
|
||||
const gchar *hint)
|
||||
{
|
||||
GList *windows;
|
||||
|
@ -27,7 +27,7 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
int n_files,
|
||||
const gchar *hint)
|
||||
{
|
||||
GList *windows;
|
||||
|
@ -27,7 +27,7 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
int n_files,
|
||||
const gchar *hint)
|
||||
{
|
||||
GList *windows;
|
||||
|
@ -63,7 +63,7 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
int n_files,
|
||||
const gchar *hint)
|
||||
{
|
||||
GList *windows;
|
||||
|
@ -63,7 +63,7 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
int n_files,
|
||||
const gchar *hint)
|
||||
{
|
||||
GList *windows;
|
||||
|
@ -70,7 +70,7 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
int n_files,
|
||||
const gchar *hint)
|
||||
{
|
||||
GList *windows;
|
||||
|
@ -70,7 +70,7 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
int n_files,
|
||||
const gchar *hint)
|
||||
{
|
||||
GList *windows;
|
||||
|
@ -70,7 +70,7 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
int n_files,
|
||||
const gchar *hint)
|
||||
{
|
||||
GList *windows;
|
||||
|
@ -70,7 +70,7 @@ example_app_activate (GApplication *app)
|
||||
static void
|
||||
example_app_open (GApplication *app,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
int n_files,
|
||||
const gchar *hint)
|
||||
{
|
||||
GList *windows;
|
||||
|
@ -150,7 +150,7 @@ text_buffer_changed_cb (GtkTextBuffer *buffer,
|
||||
{
|
||||
GtkWindow *window = user_data;
|
||||
BloatPad *app;
|
||||
gint old_n, n;
|
||||
int old_n, n;
|
||||
|
||||
app = (BloatPad *) gtk_window_get_application (window);
|
||||
|
||||
@ -293,10 +293,10 @@ bloat_pad_activate (GApplication *application)
|
||||
static void
|
||||
bloat_pad_open (GApplication *application,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
int n_files,
|
||||
const gchar *hint)
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_files; i++)
|
||||
new_window (application, files[i]);
|
||||
@ -400,7 +400,7 @@ edit_accels (GSimpleAction *action,
|
||||
GtkWidget *entry;
|
||||
gchar **actions;
|
||||
GtkWidget *dialog;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
dialog = gtk_dialog_new ();
|
||||
gtk_window_set_application (GTK_WINDOW (dialog), app);
|
||||
@ -482,7 +482,7 @@ static void
|
||||
dump_accels (GtkApplication *app)
|
||||
{
|
||||
gchar **actions;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
actions = gtk_application_list_action_descriptions (app);
|
||||
for (i = 0; actions[i]; i++)
|
||||
@ -512,7 +512,7 @@ bloat_pad_startup (GApplication *application)
|
||||
GIcon *icon2;
|
||||
GEmblem *emblem;
|
||||
GFile *file;
|
||||
gint i;
|
||||
int i;
|
||||
struct {
|
||||
const gchar *action_and_target;
|
||||
const gchar *accelerators[2];
|
||||
|
@ -124,10 +124,10 @@ plug_man_activate (GApplication *application)
|
||||
static void
|
||||
plug_man_open (GApplication *application,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
int n_files,
|
||||
const gchar *hint)
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_files; i++)
|
||||
new_window (application, files[i]);
|
||||
@ -281,7 +281,7 @@ disable_plugin (const gchar *name)
|
||||
plugin_menu = find_plugin_menu ();
|
||||
if (plugin_menu)
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < g_menu_model_get_n_items (plugin_menu); i++)
|
||||
{
|
||||
|
@ -32,8 +32,8 @@ activate_cb (GtkApplication *app,
|
||||
gtk_search_bar_set_key_capture_widget (GTK_SEARCH_BAR (search_bar), window);
|
||||
}
|
||||
|
||||
gint
|
||||
main (gint argc,
|
||||
int
|
||||
main (int argc,
|
||||
gchar *argv[])
|
||||
{
|
||||
GtkApplication *app;
|
||||
|
@ -55,10 +55,10 @@ activate (GApplication *application)
|
||||
static void
|
||||
open (GApplication *application,
|
||||
GFile **files,
|
||||
gint n_files,
|
||||
int n_files,
|
||||
const gchar *hint)
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < n_files; i++)
|
||||
new_window (application, files[i]);
|
||||
|
@ -310,7 +310,7 @@ broadway_output_set_transient_for (BroadwayOutput *output,
|
||||
append_uint16 (output, parent_id);
|
||||
}
|
||||
|
||||
static gint append_node_depth = -1;
|
||||
static int append_node_depth = -1;
|
||||
|
||||
static void
|
||||
append_type (BroadwayOutput *output, guint32 type, BroadwayNode *node)
|
||||
|
@ -63,7 +63,7 @@ struct _BroadwayServer {
|
||||
GList *surfaces;
|
||||
BroadwaySurface *root;
|
||||
gint32 focused_surface_id; /* -1 => none */
|
||||
gint show_keyboard;
|
||||
int show_keyboard;
|
||||
|
||||
guint32 next_texture_id;
|
||||
GHashTable *textures;
|
||||
@ -970,7 +970,7 @@ broadway_server_get_screen_size (BroadwayServer *server,
|
||||
|
||||
static void
|
||||
broadway_server_fake_roundtrip_reply (BroadwayServer *server,
|
||||
gint id,
|
||||
int id,
|
||||
guint32 tag)
|
||||
{
|
||||
BroadwayInputMsg msg;
|
||||
@ -1001,7 +1001,7 @@ broadway_server_flush (BroadwayServer *server)
|
||||
|
||||
void
|
||||
broadway_server_roundtrip (BroadwayServer *server,
|
||||
gint id,
|
||||
int id,
|
||||
guint32 tag)
|
||||
{
|
||||
if (server->output)
|
||||
@ -1565,7 +1565,7 @@ broadway_server_query_mouse (BroadwayServer *server,
|
||||
|
||||
void
|
||||
broadway_server_destroy_surface (BroadwayServer *server,
|
||||
gint id)
|
||||
int id)
|
||||
{
|
||||
BroadwaySurface *surface;
|
||||
|
||||
@ -1594,7 +1594,7 @@ broadway_server_destroy_surface (BroadwayServer *server,
|
||||
|
||||
gboolean
|
||||
broadway_server_surface_show (BroadwayServer *server,
|
||||
gint id)
|
||||
int id)
|
||||
{
|
||||
BroadwaySurface *surface;
|
||||
gboolean sent = FALSE;
|
||||
@ -1616,7 +1616,7 @@ broadway_server_surface_show (BroadwayServer *server,
|
||||
|
||||
gboolean
|
||||
broadway_server_surface_hide (BroadwayServer *server,
|
||||
gint id)
|
||||
int id)
|
||||
{
|
||||
BroadwaySurface *surface;
|
||||
gboolean sent = FALSE;
|
||||
@ -1646,7 +1646,7 @@ broadway_server_surface_hide (BroadwayServer *server,
|
||||
|
||||
void
|
||||
broadway_server_surface_raise (BroadwayServer *server,
|
||||
gint id)
|
||||
int id)
|
||||
{
|
||||
BroadwaySurface *surface;
|
||||
|
||||
@ -1676,7 +1676,7 @@ broadway_server_set_show_keyboard (BroadwayServer *server,
|
||||
|
||||
void
|
||||
broadway_server_surface_lower (BroadwayServer *server,
|
||||
gint id)
|
||||
int id)
|
||||
{
|
||||
BroadwaySurface *surface;
|
||||
|
||||
@ -1693,7 +1693,7 @@ broadway_server_surface_lower (BroadwayServer *server,
|
||||
|
||||
void
|
||||
broadway_server_surface_set_transient_for (BroadwayServer *server,
|
||||
gint id, gint parent)
|
||||
int id, int parent)
|
||||
{
|
||||
BroadwaySurface *surface;
|
||||
|
||||
@ -1865,7 +1865,7 @@ decode_nodes (BroadwayServer *server,
|
||||
/* passes ownership of nodes */
|
||||
void
|
||||
broadway_server_surface_update_nodes (BroadwayServer *server,
|
||||
gint id,
|
||||
int id,
|
||||
guint32 data[],
|
||||
int len,
|
||||
GHashTable *client_texture_map)
|
||||
@ -1946,7 +1946,7 @@ broadway_server_release_texture (BroadwayServer *server,
|
||||
|
||||
gboolean
|
||||
broadway_server_surface_move_resize (BroadwayServer *server,
|
||||
gint id,
|
||||
int id,
|
||||
gboolean with_move,
|
||||
int x,
|
||||
int y,
|
||||
@ -1989,7 +1989,7 @@ broadway_server_surface_move_resize (BroadwayServer *server,
|
||||
|
||||
void
|
||||
broadway_server_focus_surface (BroadwayServer *server,
|
||||
gint new_focused_surface)
|
||||
int new_focused_surface)
|
||||
{
|
||||
BroadwayInputMsg focus_msg;
|
||||
|
||||
@ -2010,8 +2010,8 @@ broadway_server_focus_surface (BroadwayServer *server,
|
||||
|
||||
guint32
|
||||
broadway_server_grab_pointer (BroadwayServer *server,
|
||||
gint client_id,
|
||||
gint id,
|
||||
int client_id,
|
||||
int id,
|
||||
gboolean owner_events,
|
||||
guint32 event_mask,
|
||||
guint32 time_)
|
||||
|
@ -60,7 +60,7 @@ gboolean broadway_server_has_client (BroadwayServer *
|
||||
void broadway_server_flush (BroadwayServer *server);
|
||||
void broadway_server_sync (BroadwayServer *server);
|
||||
void broadway_server_roundtrip (BroadwayServer *server,
|
||||
gint id,
|
||||
int id,
|
||||
guint32 tag);
|
||||
void broadway_server_get_screen_size (BroadwayServer *server,
|
||||
guint32 *width,
|
||||
@ -76,8 +76,8 @@ void broadway_server_query_mouse (BroadwayServer *
|
||||
gint32 *root_y,
|
||||
guint32 *mask);
|
||||
guint32 broadway_server_grab_pointer (BroadwayServer *server,
|
||||
gint client_id,
|
||||
gint id,
|
||||
int client_id,
|
||||
int id,
|
||||
gboolean owner_events,
|
||||
guint32 event_mask,
|
||||
guint32 time_);
|
||||
@ -93,23 +93,23 @@ guint32 broadway_server_new_surface (BroadwayServer *
|
||||
int width,
|
||||
int height);
|
||||
void broadway_server_destroy_surface (BroadwayServer *server,
|
||||
gint id);
|
||||
int id);
|
||||
gboolean broadway_server_surface_show (BroadwayServer *server,
|
||||
gint id);
|
||||
int id);
|
||||
gboolean broadway_server_surface_hide (BroadwayServer *server,
|
||||
gint id);
|
||||
int id);
|
||||
void broadway_server_surface_raise (BroadwayServer *server,
|
||||
gint id);
|
||||
int id);
|
||||
void broadway_server_surface_lower (BroadwayServer *server,
|
||||
gint id);
|
||||
int id);
|
||||
void broadway_server_surface_set_transient_for (BroadwayServer *server,
|
||||
gint id,
|
||||
gint parent);
|
||||
int id,
|
||||
int parent);
|
||||
gboolean broadway_server_surface_translate (BroadwayServer *server,
|
||||
gint id,
|
||||
int id,
|
||||
cairo_region_t *area,
|
||||
gint dx,
|
||||
gint dy);
|
||||
int dx,
|
||||
int dy);
|
||||
guint32 broadway_server_upload_texture (BroadwayServer *server,
|
||||
GBytes *texture);
|
||||
void broadway_server_release_texture (BroadwayServer *server,
|
||||
@ -117,19 +117,19 @@ void broadway_server_release_texture (BroadwayServer *
|
||||
cairo_surface_t * broadway_server_create_surface (int width,
|
||||
int height);
|
||||
void broadway_server_surface_update_nodes (BroadwayServer *server,
|
||||
gint id,
|
||||
int id,
|
||||
guint32 data[],
|
||||
int len,
|
||||
GHashTable *client_texture_map);
|
||||
gboolean broadway_server_surface_move_resize (BroadwayServer *server,
|
||||
gint id,
|
||||
int id,
|
||||
gboolean with_move,
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
void broadway_server_focus_surface (BroadwayServer *server,
|
||||
gint new_focused_surface);
|
||||
int new_focused_surface);
|
||||
|
||||
|
||||
#endif /* __BROADWAY_SERVER__ */
|
||||
|
@ -501,7 +501,7 @@ _gdk_broadway_server_new_surface (GdkBroadwayServer *server,
|
||||
|
||||
void
|
||||
_gdk_broadway_server_destroy_surface (GdkBroadwayServer *server,
|
||||
gint id)
|
||||
int id)
|
||||
{
|
||||
BroadwayRequestDestroySurface msg;
|
||||
|
||||
@ -512,7 +512,7 @@ _gdk_broadway_server_destroy_surface (GdkBroadwayServer *server,
|
||||
|
||||
gboolean
|
||||
_gdk_broadway_server_surface_show (GdkBroadwayServer *server,
|
||||
gint id)
|
||||
int id)
|
||||
{
|
||||
BroadwayRequestShowSurface msg;
|
||||
|
||||
@ -525,7 +525,7 @@ _gdk_broadway_server_surface_show (GdkBroadwayServer *server,
|
||||
|
||||
gboolean
|
||||
_gdk_broadway_server_surface_hide (GdkBroadwayServer *server,
|
||||
gint id)
|
||||
int id)
|
||||
{
|
||||
BroadwayRequestHideSurface msg;
|
||||
|
||||
@ -538,7 +538,7 @@ _gdk_broadway_server_surface_hide (GdkBroadwayServer *server,
|
||||
|
||||
void
|
||||
_gdk_broadway_server_surface_focus (GdkBroadwayServer *server,
|
||||
gint id)
|
||||
int id)
|
||||
{
|
||||
BroadwayRequestFocusSurface msg;
|
||||
|
||||
@ -549,7 +549,7 @@ _gdk_broadway_server_surface_focus (GdkBroadwayServer *server,
|
||||
|
||||
void
|
||||
_gdk_broadway_server_surface_set_transient_for (GdkBroadwayServer *server,
|
||||
gint id, gint parent)
|
||||
int id, int parent)
|
||||
{
|
||||
BroadwayRequestSetTransientFor msg;
|
||||
|
||||
@ -692,7 +692,7 @@ gdk_broadway_server_surface_set_nodes (GdkBroadwayServer *server,
|
||||
|
||||
gboolean
|
||||
_gdk_broadway_server_surface_move_resize (GdkBroadwayServer *server,
|
||||
gint id,
|
||||
int id,
|
||||
gboolean with_move,
|
||||
int x,
|
||||
int y,
|
||||
@ -716,7 +716,7 @@ _gdk_broadway_server_surface_move_resize (GdkBroadwayServer *server,
|
||||
|
||||
GdkGrabStatus
|
||||
_gdk_broadway_server_grab_pointer (GdkBroadwayServer *server,
|
||||
gint id,
|
||||
int id,
|
||||
gboolean owner_events,
|
||||
guint32 event_mask,
|
||||
guint32 time_)
|
||||
|
@ -32,7 +32,7 @@ void _gdk_broadway_server_query_mouse (GdkBroadwaySer
|
||||
gint32 *root_y,
|
||||
guint32 *mask);
|
||||
GdkGrabStatus _gdk_broadway_server_grab_pointer (GdkBroadwayServer *server,
|
||||
gint id,
|
||||
int id,
|
||||
gboolean owner_events,
|
||||
guint32 event_mask,
|
||||
guint32 time_);
|
||||
@ -45,23 +45,23 @@ guint32 _gdk_broadway_server_new_surface (GdkBroadwaySe
|
||||
int width,
|
||||
int height);
|
||||
void _gdk_broadway_server_destroy_surface (GdkBroadwayServer *server,
|
||||
gint id);
|
||||
int id);
|
||||
gboolean _gdk_broadway_server_surface_show (GdkBroadwayServer *server,
|
||||
gint id);
|
||||
int id);
|
||||
gboolean _gdk_broadway_server_surface_hide (GdkBroadwayServer *server,
|
||||
gint id);
|
||||
int id);
|
||||
void _gdk_broadway_server_surface_focus (GdkBroadwayServer *server,
|
||||
gint id);
|
||||
int id);
|
||||
void _gdk_broadway_server_surface_set_transient_for (GdkBroadwayServer *server,
|
||||
gint id,
|
||||
gint parent);
|
||||
int id,
|
||||
int parent);
|
||||
void _gdk_broadway_server_set_show_keyboard (GdkBroadwayServer *server,
|
||||
gboolean show_keyboard);
|
||||
gboolean _gdk_broadway_server_surface_translate (GdkBroadwayServer *server,
|
||||
gint id,
|
||||
int id,
|
||||
cairo_region_t *area,
|
||||
gint dx,
|
||||
gint dy);
|
||||
int dx,
|
||||
int dy);
|
||||
guint32 gdk_broadway_server_upload_texture (GdkBroadwayServer *server,
|
||||
GdkTexture *texture);
|
||||
void gdk_broadway_server_release_texture (GdkBroadwayServer *server,
|
||||
@ -70,7 +70,7 @@ void gdk_broadway_server_surface_set_nodes (GdkBroadwaySe
|
||||
guint32 id,
|
||||
GArray *nodes);
|
||||
gboolean _gdk_broadway_server_surface_move_resize (GdkBroadwayServer *server,
|
||||
gint id,
|
||||
int id,
|
||||
gboolean with_move,
|
||||
int x,
|
||||
int y,
|
||||
|
@ -25,7 +25,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
static gboolean gdk_event_source_prepare (GSource *source,
|
||||
gint *timeout);
|
||||
int *timeout);
|
||||
static gboolean gdk_event_source_check (GSource *source);
|
||||
static gboolean gdk_event_source_dispatch (GSource *source,
|
||||
GSourceFunc callback,
|
||||
@ -54,7 +54,7 @@ static GList *event_sources = NULL;
|
||||
|
||||
static gboolean
|
||||
gdk_event_source_prepare (GSource *source,
|
||||
gint *timeout)
|
||||
int *timeout)
|
||||
{
|
||||
GdkDisplay *display = ((GdkEventSource*) source)->display;
|
||||
gboolean retval;
|
||||
|
@ -142,7 +142,7 @@ gdk_broadway_keymap_get_entries_for_keycode (GdkKeymap *keymap,
|
||||
guint hardware_keycode,
|
||||
GdkKeymapKey **keys,
|
||||
guint **keyvals,
|
||||
gint *n_entries)
|
||||
int *n_entries)
|
||||
{
|
||||
if (n_entries)
|
||||
*n_entries = 1;
|
||||
@ -171,10 +171,10 @@ static gboolean
|
||||
gdk_broadway_keymap_translate_keyboard_state (GdkKeymap *keymap,
|
||||
guint hardware_keycode,
|
||||
GdkModifierType state,
|
||||
gint group,
|
||||
int group,
|
||||
guint *keyval,
|
||||
gint *effective_group,
|
||||
gint *level,
|
||||
int *effective_group,
|
||||
int *level,
|
||||
GdkModifierType *consumed_modifiers)
|
||||
{
|
||||
if (keyval)
|
||||
|
@ -55,8 +55,8 @@ GdkDrag * _gdk_broadway_surface_drag_begin (GdkSurface *surface,
|
||||
double dy);
|
||||
void _gdk_broadway_surface_translate (GdkSurface *surface,
|
||||
cairo_region_t *area,
|
||||
gint dx,
|
||||
gint dy);
|
||||
int dx,
|
||||
int dy);
|
||||
gboolean _gdk_broadway_moveresize_handle_event (GdkDisplay *display,
|
||||
BroadwayInputMsg *msg);
|
||||
gboolean _gdk_broadway_moveresize_configure_done (GdkDisplay *display,
|
||||
@ -69,13 +69,13 @@ void _gdk_broadway_surface_grab_check_unmap (GdkSurface *surface,
|
||||
gulong serial);
|
||||
|
||||
void gdk_broadway_surface_move_resize (GdkSurface *surface,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height);
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height);
|
||||
|
||||
void _gdk_keymap_keys_changed (GdkDisplay *display);
|
||||
gint _gdk_broadway_get_group_for_state (GdkDisplay *display,
|
||||
int _gdk_broadway_get_group_for_state (GdkDisplay *display,
|
||||
GdkModifierType state);
|
||||
void _gdk_keymap_add_virtual_modifiers_compat (GdkKeymap *keymap,
|
||||
GdkModifierType *modifiers);
|
||||
|
@ -405,7 +405,7 @@ gdk_broadway_surface_hide (GdkSurface *surface)
|
||||
_gdk_surface_clear_update_area (surface);
|
||||
}
|
||||
|
||||
static gint
|
||||
static int
|
||||
gdk_broadway_surface_get_scale_factor (GdkSurface *surface)
|
||||
{
|
||||
GdkBroadwayDisplay *broadway_display;
|
||||
@ -456,10 +456,10 @@ sync_child_root_pos (GdkSurface *parent)
|
||||
static void
|
||||
gdk_broadway_surface_move_resize_internal (GdkSurface *surface,
|
||||
gboolean with_move,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
GdkBroadwaySurface *impl = GDK_BROADWAY_SURFACE (surface);
|
||||
GdkBroadwayDisplay *broadway_display;
|
||||
@ -522,10 +522,10 @@ gdk_broadway_surface_move_resize_internal (GdkSurface *surface,
|
||||
|
||||
void
|
||||
gdk_broadway_surface_move_resize (GdkSurface *surface,
|
||||
gint x,
|
||||
gint y,
|
||||
gint width,
|
||||
gint height)
|
||||
int x,
|
||||
int y,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
gdk_broadway_surface_move_resize_internal (surface, TRUE,
|
||||
x, y,
|
||||
@ -534,8 +534,8 @@ gdk_broadway_surface_move_resize (GdkSurface *surface,
|
||||
|
||||
static void
|
||||
gdk_broadway_surface_toplevel_resize (GdkSurface *surface,
|
||||
gint width,
|
||||
gint height)
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
gdk_broadway_surface_move_resize_internal (surface, FALSE,
|
||||
0, 0,
|
||||
@ -544,8 +544,8 @@ gdk_broadway_surface_toplevel_resize (GdkSurface *surface,
|
||||
|
||||
static void
|
||||
gdk_broadway_surface_move (GdkSurface *surface,
|
||||
gint x,
|
||||
gint y)
|
||||
int x,
|
||||
int y)
|
||||
{
|
||||
gdk_broadway_surface_move_resize_internal (surface, TRUE, x, y, -1, -1);
|
||||
}
|
||||
@ -696,10 +696,10 @@ gdk_broadway_surface_set_transient_for (GdkSurface *surface,
|
||||
|
||||
static void
|
||||
gdk_broadway_surface_get_geometry (GdkSurface *surface,
|
||||
gint *x,
|
||||
gint *y,
|
||||
gint *width,
|
||||
gint *height)
|
||||
int *x,
|
||||
int *y,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_SURFACE (surface));
|
||||
|
||||
@ -718,10 +718,10 @@ gdk_broadway_surface_get_geometry (GdkSurface *surface,
|
||||
|
||||
static void
|
||||
gdk_broadway_surface_get_root_coords (GdkSurface *surface,
|
||||
gint x,
|
||||
gint y,
|
||||
gint *root_x,
|
||||
gint *root_y)
|
||||
int x,
|
||||
int y,
|
||||
int *root_x,
|
||||
int *root_y)
|
||||
{
|
||||
GdkBroadwaySurface *impl;
|
||||
|
||||
@ -839,13 +839,13 @@ struct _MoveResizeData
|
||||
GdkSurface *moveresize_emulation_surface;
|
||||
gboolean is_resize;
|
||||
GdkSurfaceEdge resize_edge;
|
||||
gint moveresize_button;
|
||||
gint moveresize_x;
|
||||
gint moveresize_y;
|
||||
gint moveresize_orig_x;
|
||||
gint moveresize_orig_y;
|
||||
gint moveresize_orig_width;
|
||||
gint moveresize_orig_height;
|
||||
int moveresize_button;
|
||||
int moveresize_x;
|
||||
int moveresize_y;
|
||||
int moveresize_orig_x;
|
||||
int moveresize_orig_y;
|
||||
int moveresize_orig_width;
|
||||
int moveresize_orig_height;
|
||||
long moveresize_process_time;
|
||||
GdkSurfaceHints moveresize_geom_mask;
|
||||
GdkGeometry moveresize_geometry;
|
||||
@ -876,17 +876,17 @@ get_move_resize_data (GdkDisplay *display,
|
||||
|
||||
static void
|
||||
update_pos (MoveResizeData *mv_resize,
|
||||
gint new_root_x,
|
||||
gint new_root_y)
|
||||
int new_root_x,
|
||||
int new_root_y)
|
||||
{
|
||||
gint dx, dy;
|
||||
int dx, dy;
|
||||
|
||||
dx = new_root_x - mv_resize->moveresize_x;
|
||||
dy = new_root_y - mv_resize->moveresize_y;
|
||||
|
||||
if (mv_resize->is_resize)
|
||||
{
|
||||
gint x, y, w, h;
|
||||
int x, y, w, h;
|
||||
|
||||
x = mv_resize->moveresize_orig_x;
|
||||
y = mv_resize->moveresize_orig_y;
|
||||
@ -951,7 +951,7 @@ update_pos (MoveResizeData *mv_resize,
|
||||
}
|
||||
else
|
||||
{
|
||||
gint x, y;
|
||||
int x, y;
|
||||
|
||||
x = mv_resize->moveresize_orig_x + dx;
|
||||
y = mv_resize->moveresize_orig_y + dy;
|
||||
@ -1129,7 +1129,7 @@ create_moveresize_surface (MoveResizeData *mv_resize,
|
||||
static void
|
||||
calculate_unmoving_origin (MoveResizeData *mv_resize)
|
||||
{
|
||||
gint x, y, width, height;
|
||||
int x, y, width, height;
|
||||
|
||||
if (mv_resize->moveresize_geom_mask & GDK_HINT_WIN_GRAVITY &&
|
||||
mv_resize->moveresize_geometry.win_gravity == GDK_GRAVITY_STATIC)
|
||||
|
@ -403,7 +403,7 @@ gdk_unichar_direction (gunichar ch)
|
||||
|
||||
PangoDirection
|
||||
gdk_find_base_dir (const gchar *text,
|
||||
gint length)
|
||||
int length)
|
||||
{
|
||||
PangoDirection dir = PANGO_DIRECTION_NEUTRAL;
|
||||
const gchar *p;
|
||||
|
@ -205,7 +205,7 @@ gdk_app_launch_context_get_display (GdkAppLaunchContext *context)
|
||||
*/
|
||||
void
|
||||
gdk_app_launch_context_set_desktop (GdkAppLaunchContext *context,
|
||||
gint desktop)
|
||||
int desktop)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_APP_LAUNCH_CONTEXT (context));
|
||||
|
||||
|
@ -43,7 +43,7 @@ GdkDisplay * gdk_app_launch_context_get_display (GdkAppLaunchContext *
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_app_launch_context_set_desktop (GdkAppLaunchContext *context,
|
||||
gint desktop);
|
||||
int desktop);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_app_launch_context_set_timestamp (GdkAppLaunchContext *context,
|
||||
guint32 timestamp);
|
||||
|
@ -35,7 +35,7 @@ struct _GdkAppLaunchContext
|
||||
GAppLaunchContext parent_instance;
|
||||
|
||||
GdkDisplay *display;
|
||||
gint workspace;
|
||||
int workspace;
|
||||
guint32 timestamp;
|
||||
GIcon *icon;
|
||||
char *icon_name;
|
||||
|
@ -91,7 +91,7 @@ gdk_cairo_region (cairo_t *cr,
|
||||
const cairo_region_t *region)
|
||||
{
|
||||
cairo_rectangle_int_t box;
|
||||
gint n_boxes, i;
|
||||
int n_boxes, i;
|
||||
|
||||
g_return_if_fail (cr != NULL);
|
||||
g_return_if_fail (region != NULL);
|
||||
@ -109,7 +109,7 @@ void
|
||||
gdk_cairo_surface_paint_pixbuf (cairo_surface_t *surface,
|
||||
const GdkPixbuf *pixbuf)
|
||||
{
|
||||
gint width, height;
|
||||
int width, height;
|
||||
guchar *gdk_pixels, *cairo_pixels;
|
||||
int gdk_rowstride, cairo_stride;
|
||||
int n_channels;
|
||||
@ -312,7 +312,7 @@ gdk_cairo_region_create_from_surface (cairo_surface_t *surface)
|
||||
GdkRectangle extents, rect;
|
||||
cairo_surface_t *image;
|
||||
cairo_t *cr;
|
||||
gint x, y, stride;
|
||||
int x, y, stride;
|
||||
guchar *data;
|
||||
|
||||
_gdk_cairo_surface_extents (surface, &extents);
|
||||
@ -347,7 +347,7 @@ gdk_cairo_region_create_from_surface (cairo_surface_t *surface)
|
||||
for (x = 0; x < extents.width; x++)
|
||||
{
|
||||
/* Search for a continuous range of "non transparent pixels"*/
|
||||
gint x0 = x;
|
||||
int x0 = x;
|
||||
while (x < extents.width)
|
||||
{
|
||||
#if G_BYTE_ORDER == G_LITTLE_ENDIAN
|
||||
|
@ -850,7 +850,7 @@ gdk_device_get_device_type (GdkDevice *device)
|
||||
*
|
||||
* Returns: the number of axes.
|
||||
**/
|
||||
gint
|
||||
int
|
||||
gdk_device_get_n_axes (GdkDevice *device)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), 0);
|
||||
@ -877,7 +877,7 @@ gdk_device_get_axis (GdkDevice *device,
|
||||
GdkAxisUse use,
|
||||
gdouble *value)
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_DEVICE (device), FALSE);
|
||||
g_return_val_if_fail (device->source != GDK_SOURCE_KEYBOARD, FALSE);
|
||||
@ -980,7 +980,7 @@ gdk_device_ungrab (GdkDevice *device,
|
||||
void
|
||||
_gdk_device_reset_axes (GdkDevice *device)
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
for (i = device->axes->len - 1; i >= 0; i--)
|
||||
g_array_remove_index (device->axes, i);
|
||||
@ -1061,7 +1061,7 @@ find_axis_info (GArray *array,
|
||||
GdkAxisUse use)
|
||||
{
|
||||
GdkAxisInfo *info;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < GDK_AXIS_LAST; i++)
|
||||
{
|
||||
@ -1089,7 +1089,7 @@ _gdk_device_translate_surface_coord (GdkDevice *device,
|
||||
gdouble x_min, y_min;
|
||||
gdouble x_resolution, y_resolution;
|
||||
gdouble device_aspect;
|
||||
gint surface_width, surface_height;
|
||||
int surface_width, surface_height;
|
||||
|
||||
if (index_ >= device->axes->len)
|
||||
return FALSE;
|
||||
|
@ -124,7 +124,7 @@ GdkSurface * gdk_device_get_surface_at_position (GdkDevice *device,
|
||||
double *win_y);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gint gdk_device_get_n_axes (GdkDevice *device);
|
||||
int gdk_device_get_n_axes (GdkDevice *device);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gboolean gdk_device_get_axis (GdkDevice *device,
|
||||
gdouble *axes,
|
||||
|
@ -73,7 +73,7 @@ gdk_device_pad_default_init (GdkDevicePadInterface *pad)
|
||||
*
|
||||
* Returns: The number of button/ring/strip groups in the pad.
|
||||
**/
|
||||
gint
|
||||
int
|
||||
gdk_device_pad_get_n_groups (GdkDevicePad *pad)
|
||||
{
|
||||
GdkDevicePadInterface *iface = GDK_DEVICE_PAD_GET_IFACE (pad);
|
||||
@ -92,9 +92,9 @@ gdk_device_pad_get_n_groups (GdkDevicePad *pad)
|
||||
*
|
||||
* Returns: The number of modes available in @group.
|
||||
**/
|
||||
gint
|
||||
int
|
||||
gdk_device_pad_get_group_n_modes (GdkDevicePad *pad,
|
||||
gint group_idx)
|
||||
int group_idx)
|
||||
{
|
||||
GdkDevicePadInterface *iface = GDK_DEVICE_PAD_GET_IFACE (pad);
|
||||
|
||||
@ -113,7 +113,7 @@ gdk_device_pad_get_group_n_modes (GdkDevicePad *pad,
|
||||
*
|
||||
* Returns: The amount of elements of type @feature that this pad has.
|
||||
**/
|
||||
gint
|
||||
int
|
||||
gdk_device_pad_get_n_features (GdkDevicePad *pad,
|
||||
GdkDevicePadFeature feature)
|
||||
{
|
||||
@ -135,10 +135,10 @@ gdk_device_pad_get_n_features (GdkDevicePad *pad,
|
||||
*
|
||||
* Returns: The group number of the queried pad feature.
|
||||
**/
|
||||
gint
|
||||
int
|
||||
gdk_device_pad_get_feature_group (GdkDevicePad *pad,
|
||||
GdkDevicePadFeature feature,
|
||||
gint idx)
|
||||
int idx)
|
||||
{
|
||||
GdkDevicePadInterface *iface = GDK_DEVICE_PAD_GET_IFACE (pad);
|
||||
|
||||
|
@ -54,20 +54,20 @@ GDK_AVAILABLE_IN_ALL
|
||||
GType gdk_device_pad_get_type (void) G_GNUC_CONST;
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gint gdk_device_pad_get_n_groups (GdkDevicePad *pad);
|
||||
int gdk_device_pad_get_n_groups (GdkDevicePad *pad);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gint gdk_device_pad_get_group_n_modes (GdkDevicePad *pad,
|
||||
gint group_idx);
|
||||
int gdk_device_pad_get_group_n_modes (GdkDevicePad *pad,
|
||||
int group_idx);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gint gdk_device_pad_get_n_features (GdkDevicePad *pad,
|
||||
int gdk_device_pad_get_n_features (GdkDevicePad *pad,
|
||||
GdkDevicePadFeature feature);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gint gdk_device_pad_get_feature_group (GdkDevicePad *pad,
|
||||
int gdk_device_pad_get_feature_group (GdkDevicePad *pad,
|
||||
GdkDevicePadFeature feature,
|
||||
gint feature_idx);
|
||||
int feature_idx);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -29,15 +29,15 @@ G_BEGIN_DECLS
|
||||
struct _GdkDevicePadInterface {
|
||||
GTypeInterface parent_interface;
|
||||
|
||||
gint (* get_n_groups) (GdkDevicePad *pad);
|
||||
int (* get_n_groups) (GdkDevicePad *pad);
|
||||
|
||||
gint (* get_group_n_modes) (GdkDevicePad *pad,
|
||||
gint group);
|
||||
gint (* get_n_features) (GdkDevicePad *pad,
|
||||
int (* get_group_n_modes) (GdkDevicePad *pad,
|
||||
int group);
|
||||
int (* get_n_features) (GdkDevicePad *pad,
|
||||
GdkDevicePadFeature feature);
|
||||
gint (* get_feature_group) (GdkDevicePad *pad,
|
||||
int (* get_feature_group) (GdkDevicePad *pad,
|
||||
GdkDevicePadFeature feature,
|
||||
gint idx);
|
||||
int idx);
|
||||
};
|
||||
|
||||
G_END_DECLS
|
||||
|
@ -130,7 +130,7 @@ gboolean _gdk_device_translate_axis (GdkDevice *device,
|
||||
gdouble *axis_value);
|
||||
|
||||
GdkTimeCoord ** _gdk_device_allocate_history (GdkDevice *device,
|
||||
gint n_events);
|
||||
int n_events);
|
||||
|
||||
void _gdk_device_add_physical_device (GdkDevice *device,
|
||||
GdkDevice *physical);
|
||||
|
@ -394,7 +394,7 @@ gdk_display_manager_open_display (GdkDisplayManager *manager,
|
||||
const gchar *backend_list;
|
||||
GdkDisplay *display;
|
||||
gchar **backends;
|
||||
gint i, j;
|
||||
int i, j;
|
||||
gboolean allow_any;
|
||||
|
||||
if (allowed_backends == NULL)
|
||||
|
@ -722,8 +722,8 @@ gdk_drag_get_drag_surface (GdkDrag *drag)
|
||||
*/
|
||||
void
|
||||
gdk_drag_set_hotspot (GdkDrag *drag,
|
||||
gint hot_x,
|
||||
gint hot_y)
|
||||
int hot_x,
|
||||
int hot_y)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_DRAG (drag));
|
||||
|
||||
@ -807,7 +807,7 @@ GdkCursor *
|
||||
gdk_drag_get_cursor (GdkDrag *drag,
|
||||
GdkDragAction action)
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
for (i = 0 ; i < G_N_ELEMENTS (drag_cursors) - 1; i++)
|
||||
if (drag_cursors[i].action == action)
|
||||
|
@ -88,8 +88,8 @@ GdkSurface *gdk_drag_get_drag_surface (GdkDrag *drag);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_drag_set_hotspot (GdkDrag *drag,
|
||||
gint hot_x,
|
||||
gint hot_y);
|
||||
int hot_x,
|
||||
int hot_y);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkContentProvider *
|
||||
|
@ -35,8 +35,8 @@ struct _GdkDragClass {
|
||||
|
||||
GdkSurface* (*get_drag_surface) (GdkDrag *drag);
|
||||
void (*set_hotspot) (GdkDrag *drag,
|
||||
gint hot_x,
|
||||
gint hot_y);
|
||||
int hot_x,
|
||||
int hot_y);
|
||||
void (*drop_done) (GdkDrag *drag,
|
||||
gboolean success);
|
||||
|
||||
|
@ -734,7 +734,7 @@ gdk_motion_event_push_history (GdkEvent *event,
|
||||
GdkMotionEvent *self = (GdkMotionEvent *) event;
|
||||
GdkTimeCoord hist;
|
||||
GdkDevice *device;
|
||||
gint i, n_axes;
|
||||
int i, n_axes;
|
||||
|
||||
g_assert (GDK_IS_EVENT_TYPE (event, GDK_MOTION_NOTIFY));
|
||||
g_assert (GDK_IS_EVENT_TYPE (history_event, GDK_MOTION_NOTIFY));
|
||||
|
@ -94,10 +94,10 @@ static guint fps_counter;
|
||||
struct _GdkFrameClockPrivate
|
||||
{
|
||||
gint64 frame_counter;
|
||||
gint n_timings;
|
||||
gint current;
|
||||
int n_timings;
|
||||
int current;
|
||||
GdkFrameTimings *timings[FRAME_HISTORY_MAX_LENGTH];
|
||||
gint n_freeze_inhibitors;
|
||||
int n_freeze_inhibitors;
|
||||
};
|
||||
|
||||
G_DEFINE_ABSTRACT_TYPE_WITH_PRIVATE (GdkFrameClock, gdk_frame_clock, G_TYPE_OBJECT)
|
||||
@ -489,7 +489,7 @@ gdk_frame_clock_get_timings (GdkFrameClock *frame_clock,
|
||||
gint64 frame_counter)
|
||||
{
|
||||
GdkFrameClockPrivate *priv;
|
||||
gint pos;
|
||||
int pos;
|
||||
|
||||
g_return_val_if_fail (GDK_IS_FRAME_CLOCK (frame_clock), NULL);
|
||||
|
||||
|
@ -85,7 +85,7 @@ static GSource *sleep_source;
|
||||
|
||||
static gboolean
|
||||
sleep_source_prepare (GSource *source,
|
||||
gint *timeout)
|
||||
int *timeout)
|
||||
{
|
||||
sleep_source_prepare_time = g_source_get_time (source);
|
||||
*timeout = -1;
|
||||
|
@ -271,20 +271,20 @@ void gdk_device_get_position (GdkDevice *device,
|
||||
|
||||
|
||||
void gdk_surface_get_root_coords (GdkSurface *surface,
|
||||
gint x,
|
||||
gint y,
|
||||
gint *root_x,
|
||||
gint *root_y);
|
||||
int x,
|
||||
int y,
|
||||
int *root_x,
|
||||
int *root_y);
|
||||
void gdk_surface_get_origin (GdkSurface *surface,
|
||||
gint *x,
|
||||
gint *y);
|
||||
int *x,
|
||||
int *y);
|
||||
|
||||
|
||||
void gdk_surface_get_geometry (GdkSurface *surface,
|
||||
gint *x,
|
||||
gint *y,
|
||||
gint *width,
|
||||
gint *height);
|
||||
int *x,
|
||||
int *y,
|
||||
int *width,
|
||||
int *height);
|
||||
|
||||
GdkGLContext *gdk_surface_get_shared_data_gl_context (GdkSurface *surface);
|
||||
|
||||
@ -323,14 +323,14 @@ typedef struct _GdkGeometry GdkGeometry;
|
||||
|
||||
struct _GdkGeometry
|
||||
{
|
||||
gint min_width;
|
||||
gint min_height;
|
||||
gint max_width;
|
||||
gint max_height;
|
||||
gint base_width;
|
||||
gint base_height;
|
||||
gint width_inc;
|
||||
gint height_inc;
|
||||
int min_width;
|
||||
int min_height;
|
||||
int max_width;
|
||||
int max_height;
|
||||
int base_width;
|
||||
int base_height;
|
||||
int width_inc;
|
||||
int height_inc;
|
||||
gdouble min_aspect;
|
||||
gdouble max_aspect;
|
||||
GdkGravity win_gravity;
|
||||
@ -339,10 +339,10 @@ struct _GdkGeometry
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_surface_constrain_size (GdkGeometry *geometry,
|
||||
GdkSurfaceHints flags,
|
||||
gint width,
|
||||
gint height,
|
||||
gint *new_width,
|
||||
gint *new_height);
|
||||
int width,
|
||||
int height,
|
||||
int *new_width,
|
||||
int *new_height);
|
||||
|
||||
/*
|
||||
* GdkSeatGrabPrepareFunc:
|
||||
@ -376,16 +376,16 @@ GdkKeymap * gdk_display_get_keymap (GdkDisplay *display);
|
||||
void gdk_surface_begin_resize_drag (GdkSurface *surface,
|
||||
GdkSurfaceEdge edge,
|
||||
GdkDevice *device,
|
||||
gint button,
|
||||
gint x,
|
||||
gint y,
|
||||
int button,
|
||||
int x,
|
||||
int y,
|
||||
guint32 timestamp);
|
||||
|
||||
void gdk_surface_begin_move_drag (GdkSurface *surface,
|
||||
GdkDevice *device,
|
||||
gint button,
|
||||
gint x,
|
||||
gint y,
|
||||
int button,
|
||||
int x,
|
||||
int y,
|
||||
guint32 timestamp);
|
||||
|
||||
G_END_DECLS
|
||||
|
@ -541,7 +541,7 @@ gboolean
|
||||
gdk_keymap_get_entries_for_keyval (GdkKeymap *keymap,
|
||||
guint keyval,
|
||||
GdkKeymapKey **keys,
|
||||
gint *n_keys)
|
||||
int *n_keys)
|
||||
{
|
||||
GArray *array;
|
||||
|
||||
@ -621,7 +621,7 @@ gdk_keymap_get_entries_for_keycode (GdkKeymap *keymap,
|
||||
guint hardware_keycode,
|
||||
GdkKeymapKey **keys,
|
||||
guint **keyvals,
|
||||
gint *n_entries)
|
||||
int *n_entries)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_KEYMAP (keymap), FALSE);
|
||||
g_return_val_if_fail (n_entries != NULL, FALSE);
|
||||
@ -723,10 +723,10 @@ gboolean
|
||||
gdk_keymap_translate_keyboard_state (GdkKeymap *keymap,
|
||||
guint hardware_keycode,
|
||||
GdkModifierType state,
|
||||
gint group,
|
||||
int group,
|
||||
guint *keyval,
|
||||
gint *effective_group,
|
||||
gint *level,
|
||||
int *effective_group,
|
||||
int *level,
|
||||
GdkModifierType *consumed_modifiers)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_KEYMAP (keymap), FALSE);
|
||||
|
@ -48,16 +48,16 @@ struct _GdkKeymapClass
|
||||
guint hardware_keycode,
|
||||
GdkKeymapKey **keys,
|
||||
guint **keyvals,
|
||||
gint *n_entries);
|
||||
int *n_entries);
|
||||
guint (* lookup_key) (GdkKeymap *keymap,
|
||||
const GdkKeymapKey *key);
|
||||
gboolean (* translate_keyboard_state) (GdkKeymap *keymap,
|
||||
guint hardware_keycode,
|
||||
GdkModifierType state,
|
||||
gint group,
|
||||
int group,
|
||||
guint *keyval,
|
||||
gint *effective_group,
|
||||
gint *level,
|
||||
int *effective_group,
|
||||
int *level,
|
||||
GdkModifierType *consumed_modifiers);
|
||||
guint (* get_modifier_state) (GdkKeymap *keymap);
|
||||
|
||||
@ -94,20 +94,20 @@ guint gdk_keymap_lookup_key (GdkKeymap *keymap,
|
||||
gboolean gdk_keymap_translate_keyboard_state (GdkKeymap *keymap,
|
||||
guint hardware_keycode,
|
||||
GdkModifierType state,
|
||||
gint group,
|
||||
int group,
|
||||
guint *keyval,
|
||||
gint *effective_group,
|
||||
gint *level,
|
||||
int *effective_group,
|
||||
int *level,
|
||||
GdkModifierType *consumed_modifiers);
|
||||
gboolean gdk_keymap_get_entries_for_keyval (GdkKeymap *keymap,
|
||||
guint keyval,
|
||||
GdkKeymapKey **keys,
|
||||
gint *n_keys);
|
||||
int *n_keys);
|
||||
gboolean gdk_keymap_get_entries_for_keycode (GdkKeymap *keymap,
|
||||
guint hardware_keycode,
|
||||
GdkKeymapKey **keys,
|
||||
guint **keyvals,
|
||||
gint *n_entries);
|
||||
int *n_entries);
|
||||
|
||||
PangoDirection gdk_keymap_get_direction (GdkKeymap *keymap);
|
||||
gboolean gdk_keymap_have_bidi_layouts (GdkKeymap *keymap);
|
||||
|
@ -127,16 +127,16 @@
|
||||
*/
|
||||
static cairo_region_t*
|
||||
layout_iter_get_line_clip_region (PangoLayoutIter *iter,
|
||||
gint x_origin,
|
||||
gint y_origin,
|
||||
const gint *index_ranges,
|
||||
gint n_ranges)
|
||||
int x_origin,
|
||||
int y_origin,
|
||||
const int *index_ranges,
|
||||
int n_ranges)
|
||||
{
|
||||
PangoLayoutLine *line;
|
||||
cairo_region_t *clip_region;
|
||||
PangoRectangle logical_rect;
|
||||
gint baseline;
|
||||
gint i;
|
||||
int baseline;
|
||||
int i;
|
||||
|
||||
line = pango_layout_iter_get_line_readonly (iter);
|
||||
|
||||
@ -148,9 +148,9 @@ layout_iter_get_line_clip_region (PangoLayoutIter *iter,
|
||||
i = 0;
|
||||
while (i < n_ranges)
|
||||
{
|
||||
gint *pixel_ranges = NULL;
|
||||
gint n_pixel_ranges = 0;
|
||||
gint j;
|
||||
int *pixel_ranges = NULL;
|
||||
int n_pixel_ranges = 0;
|
||||
int j;
|
||||
|
||||
/* Note that get_x_ranges returns layout coordinates
|
||||
*/
|
||||
@ -212,10 +212,10 @@ layout_iter_get_line_clip_region (PangoLayoutIter *iter,
|
||||
**/
|
||||
cairo_region_t*
|
||||
gdk_pango_layout_line_get_clip_region (PangoLayoutLine *line,
|
||||
gint x_origin,
|
||||
gint y_origin,
|
||||
const gint *index_ranges,
|
||||
gint n_ranges)
|
||||
int x_origin,
|
||||
int y_origin,
|
||||
const int *index_ranges,
|
||||
int n_ranges)
|
||||
{
|
||||
cairo_region_t *clip_region;
|
||||
PangoLayoutIter *iter;
|
||||
@ -256,10 +256,10 @@ gdk_pango_layout_line_get_clip_region (PangoLayoutLine *line,
|
||||
**/
|
||||
cairo_region_t*
|
||||
gdk_pango_layout_get_clip_region (PangoLayout *layout,
|
||||
gint x_origin,
|
||||
gint y_origin,
|
||||
const gint *index_ranges,
|
||||
gint n_ranges)
|
||||
int x_origin,
|
||||
int y_origin,
|
||||
const int *index_ranges,
|
||||
int n_ranges)
|
||||
{
|
||||
PangoLayoutIter *iter;
|
||||
cairo_region_t *clip_region;
|
||||
@ -275,7 +275,7 @@ gdk_pango_layout_get_clip_region (PangoLayout *layout,
|
||||
{
|
||||
PangoRectangle logical_rect;
|
||||
cairo_region_t *line_region;
|
||||
gint baseline;
|
||||
int baseline;
|
||||
|
||||
pango_layout_iter_get_line_extents (iter, NULL, &logical_rect);
|
||||
baseline = pango_layout_iter_get_baseline (iter);
|
||||
|
@ -35,16 +35,16 @@ G_BEGIN_DECLS
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
cairo_region_t *gdk_pango_layout_line_get_clip_region (PangoLayoutLine *line,
|
||||
gint x_origin,
|
||||
gint y_origin,
|
||||
const gint *index_ranges,
|
||||
gint n_ranges);
|
||||
int x_origin,
|
||||
int y_origin,
|
||||
const int *index_ranges,
|
||||
int n_ranges);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
cairo_region_t *gdk_pango_layout_get_clip_region (PangoLayout *layout,
|
||||
gint x_origin,
|
||||
gint y_origin,
|
||||
const gint *index_ranges,
|
||||
gint n_ranges);
|
||||
int x_origin,
|
||||
int y_origin,
|
||||
const int *index_ranges,
|
||||
int n_ranges);
|
||||
|
||||
G_END_DECLS
|
||||
|
||||
|
@ -34,7 +34,7 @@ typedef struct _GdkIOPipe GdkIOPipe;
|
||||
|
||||
struct _GdkIOPipe
|
||||
{
|
||||
gint ref_count;
|
||||
int ref_count;
|
||||
|
||||
GMutex mutex;
|
||||
GCond cond;
|
||||
|
@ -169,10 +169,10 @@ convert_no_alpha (guchar *dest_data,
|
||||
*/
|
||||
GdkPixbuf *
|
||||
gdk_pixbuf_get_from_surface (cairo_surface_t *surface,
|
||||
gint src_x,
|
||||
gint src_y,
|
||||
gint width,
|
||||
gint height)
|
||||
int src_x,
|
||||
int src_y,
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
cairo_content_t content;
|
||||
GdkPixbuf *dest;
|
||||
|
@ -40,10 +40,10 @@ G_BEGIN_DECLS
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkPixbuf *gdk_pixbuf_get_from_surface (cairo_surface_t *surface,
|
||||
gint src_x,
|
||||
gint src_y,
|
||||
gint width,
|
||||
gint height);
|
||||
int src_x,
|
||||
int src_y,
|
||||
int width,
|
||||
int height);
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkPixbuf *gdk_pixbuf_get_from_texture (GdkTexture *texture);
|
||||
|
||||
|
@ -67,7 +67,7 @@ gdk_rectangle_union (const GdkRectangle *src1,
|
||||
const GdkRectangle *src2,
|
||||
GdkRectangle *dest)
|
||||
{
|
||||
gint dest_x, dest_y;
|
||||
int dest_x, dest_y;
|
||||
|
||||
g_return_if_fail (src1 != NULL);
|
||||
g_return_if_fail (src2 != NULL);
|
||||
@ -102,9 +102,9 @@ gdk_rectangle_intersect (const GdkRectangle *src1,
|
||||
const GdkRectangle *src2,
|
||||
GdkRectangle *dest)
|
||||
{
|
||||
gint dest_x, dest_y;
|
||||
gint dest_x2, dest_y2;
|
||||
gint return_val;
|
||||
int dest_x, dest_y;
|
||||
int dest_x2, dest_y2;
|
||||
int return_val;
|
||||
|
||||
g_return_val_if_fail (src1 != NULL, FALSE);
|
||||
g_return_val_if_fail (src2 != NULL, FALSE);
|
||||
|
@ -140,7 +140,7 @@ static GdkMonitor *
|
||||
get_monitor_for_rect (GdkDisplay *display,
|
||||
const GdkRectangle *rect)
|
||||
{
|
||||
gint biggest_area = G_MININT;
|
||||
int biggest_area = G_MININT;
|
||||
GdkMonitor *best_monitor = NULL;
|
||||
GdkMonitor *monitor;
|
||||
GdkRectangle workarea;
|
||||
@ -168,7 +168,7 @@ get_monitor_for_rect (GdkDisplay *display,
|
||||
return best_monitor;
|
||||
}
|
||||
|
||||
static gint
|
||||
static int
|
||||
get_anchor_x_sign (GdkGravity anchor)
|
||||
{
|
||||
switch (anchor)
|
||||
@ -192,7 +192,7 @@ get_anchor_x_sign (GdkGravity anchor)
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
static int
|
||||
get_anchor_y_sign (GdkGravity anchor)
|
||||
{
|
||||
switch (anchor)
|
||||
@ -216,20 +216,20 @@ get_anchor_y_sign (GdkGravity anchor)
|
||||
}
|
||||
}
|
||||
|
||||
static gint
|
||||
maybe_flip_position (gint bounds_pos,
|
||||
gint bounds_size,
|
||||
gint rect_pos,
|
||||
gint rect_size,
|
||||
gint surface_size,
|
||||
gint rect_sign,
|
||||
gint surface_sign,
|
||||
gint offset,
|
||||
static int
|
||||
maybe_flip_position (int bounds_pos,
|
||||
int bounds_size,
|
||||
int rect_pos,
|
||||
int rect_size,
|
||||
int surface_size,
|
||||
int rect_sign,
|
||||
int surface_sign,
|
||||
int offset,
|
||||
gboolean flip,
|
||||
gboolean *flipped)
|
||||
{
|
||||
gint primary;
|
||||
gint secondary;
|
||||
int primary;
|
||||
int secondary;
|
||||
|
||||
*flipped = FALSE;
|
||||
primary = rect_pos + (1 + rect_sign) * rect_size / 2 + offset - (1 + surface_sign) * surface_size / 2;
|
||||
@ -784,8 +784,8 @@ gdk_surface_new (GdkDisplay *display,
|
||||
**/
|
||||
GdkSurface *
|
||||
gdk_surface_new_toplevel (GdkDisplay *display,
|
||||
gint width,
|
||||
gint height)
|
||||
int width,
|
||||
int height)
|
||||
{
|
||||
g_return_val_if_fail (GDK_IS_DISPLAY (display), NULL);
|
||||
|
||||
@ -1556,10 +1556,10 @@ gdk_surface_thaw_toplevel_updates (GdkSurface *surface)
|
||||
void
|
||||
gdk_surface_constrain_size (GdkGeometry *geometry,
|
||||
GdkSurfaceHints flags,
|
||||
gint width,
|
||||
gint height,
|
||||
gint *new_width,
|
||||
gint *new_height)
|
||||
int width,
|
||||
int height,
|
||||
int *new_width,
|
||||
int *new_height)
|
||||
{
|
||||
/* This routine is partially borrowed from fvwm.
|
||||
*
|
||||
@ -1569,16 +1569,16 @@ gdk_surface_constrain_size (GdkGeometry *geometry,
|
||||
*
|
||||
* which in turn borrows parts of the algorithm from uwm
|
||||
*/
|
||||
gint min_width = 0;
|
||||
gint min_height = 0;
|
||||
gint base_width = 0;
|
||||
gint base_height = 0;
|
||||
gint xinc = 1;
|
||||
gint yinc = 1;
|
||||
gint max_width = G_MAXINT;
|
||||
gint max_height = G_MAXINT;
|
||||
int min_width = 0;
|
||||
int min_height = 0;
|
||||
int base_width = 0;
|
||||
int base_height = 0;
|
||||
int xinc = 1;
|
||||
int yinc = 1;
|
||||
int max_width = G_MAXINT;
|
||||
int max_height = G_MAXINT;
|
||||
|
||||
#define FLOOR(value, base) ( ((gint) ((value) / (base))) * (base) )
|
||||
#define FLOOR(value, base) ( ((int) ((value) / (base))) * (base) )
|
||||
|
||||
if ((flags & GDK_HINT_BASE_SIZE) && (flags & GDK_HINT_MIN_SIZE))
|
||||
{
|
||||
@ -1635,7 +1635,7 @@ gdk_surface_constrain_size (GdkGeometry *geometry,
|
||||
geometry->min_aspect > 0 &&
|
||||
geometry->max_aspect > 0)
|
||||
{
|
||||
gint delta;
|
||||
int delta;
|
||||
|
||||
if (flags & GDK_HINT_BASE_SIZE)
|
||||
{
|
||||
@ -1983,10 +1983,10 @@ gdk_surface_set_device_cursor (GdkSurface *surface,
|
||||
*/
|
||||
void
|
||||
gdk_surface_get_geometry (GdkSurface *surface,
|
||||
gint *x,
|
||||
gint *y,
|
||||
gint *width,
|
||||
gint *height)
|
||||
int *x,
|
||||
int *y,
|
||||
int *width,
|
||||
int *height)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_SURFACE (surface));
|
||||
|
||||
@ -2047,8 +2047,8 @@ gdk_surface_get_height (GdkSurface *surface)
|
||||
*/
|
||||
void
|
||||
gdk_surface_get_origin (GdkSurface *surface,
|
||||
gint *x,
|
||||
gint *y)
|
||||
int *x,
|
||||
int *y)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_SURFACE (surface));
|
||||
|
||||
@ -2070,10 +2070,10 @@ gdk_surface_get_origin (GdkSurface *surface,
|
||||
*/
|
||||
void
|
||||
gdk_surface_get_root_coords (GdkSurface *surface,
|
||||
gint x,
|
||||
gint y,
|
||||
gint *root_x,
|
||||
gint *root_y)
|
||||
int x,
|
||||
int y,
|
||||
int *root_x,
|
||||
int *root_y)
|
||||
{
|
||||
g_return_if_fail (GDK_IS_SURFACE (surface));
|
||||
|
||||
@ -2528,7 +2528,7 @@ gdk_surface_get_frame_clock (GdkSurface *surface)
|
||||
*
|
||||
* Returns: the scale factor
|
||||
*/
|
||||
gint
|
||||
int
|
||||
gdk_surface_get_scale_factor (GdkSurface *surface)
|
||||
{
|
||||
GdkSurfaceClass *class;
|
||||
@ -2554,7 +2554,7 @@ gdk_surface_get_unscaled_size (GdkSurface *surface,
|
||||
int *unscaled_height)
|
||||
{
|
||||
GdkSurfaceClass *class;
|
||||
gint scale;
|
||||
int scale;
|
||||
|
||||
g_return_if_fail (GDK_IS_SURFACE (surface));
|
||||
|
||||
@ -2637,10 +2637,10 @@ gdk_surface_set_opaque_region (GdkSurface *surface,
|
||||
*/
|
||||
void
|
||||
gdk_surface_set_shadow_width (GdkSurface *surface,
|
||||
gint left,
|
||||
gint right,
|
||||
gint top,
|
||||
gint bottom)
|
||||
int left,
|
||||
int right,
|
||||
int top,
|
||||
int bottom)
|
||||
{
|
||||
GdkSurfaceClass *class;
|
||||
|
||||
|
@ -186,7 +186,7 @@ gboolean gdk_surface_translate_coordinates (GdkSurface *from,
|
||||
double *y);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
gint gdk_surface_get_scale_factor (GdkSurface *surface);
|
||||
int gdk_surface_get_scale_factor (GdkSurface *surface);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_surface_get_device_position (GdkSurface *surface,
|
||||
@ -222,10 +222,10 @@ void gdk_surface_set_opaque_region (GdkSurface *surface,
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
void gdk_surface_set_shadow_width (GdkSurface *surface,
|
||||
gint left,
|
||||
gint right,
|
||||
gint top,
|
||||
gint bottom);
|
||||
int left,
|
||||
int right,
|
||||
int top,
|
||||
int bottom);
|
||||
|
||||
GDK_AVAILABLE_IN_ALL
|
||||
GdkCairoContext *gdk_surface_create_cairo_context(GdkSurface *surface);
|
||||
|
@ -45,8 +45,8 @@ struct _GdkSurface
|
||||
|
||||
gpointer widget;
|
||||
|
||||
gint x;
|
||||
gint y;
|
||||
int x;
|
||||
int y;
|
||||
|
||||
guint8 resize_count;
|
||||
|
||||
@ -81,11 +81,11 @@ struct _GdkSurface
|
||||
|
||||
guint update_and_descendants_freeze_count;
|
||||
|
||||
gint width, height;
|
||||
gint shadow_top;
|
||||
gint shadow_left;
|
||||
gint shadow_right;
|
||||
gint shadow_bottom;
|
||||
int width, height;
|
||||
int shadow_top;
|
||||
int shadow_left;
|
||||
int shadow_right;
|
||||
int shadow_bottom;
|
||||
|
||||
GdkCursor *cursor;
|
||||
GHashTable *device_cursor;
|
||||
@ -114,15 +114,15 @@ struct _GdkSurfaceClass
|
||||
|
||||
void (* hide) (GdkSurface *surface);
|
||||
void (* get_geometry) (GdkSurface *surface,
|
||||
gint *x,
|
||||
gint *y,
|
||||
gint *width,
|
||||
gint *height);
|
||||
int *x,
|
||||
int *y,
|
||||
int *width,
|
||||
int *height);
|
||||
void (* get_root_coords) (GdkSurface *surface,
|
||||
gint x,
|
||||
gint y,
|
||||
gint *root_x,
|
||||
gint *root_y);
|
||||
int x,
|
||||
int y,
|
||||
int *root_x,
|
||||
int *root_y);
|
||||
gboolean (* get_device_state) (GdkSurface *surface,
|
||||
GdkDevice *device,
|
||||
gdouble *x,
|
||||
@ -155,7 +155,7 @@ struct _GdkSurfaceClass
|
||||
double dx,
|
||||
double dy);
|
||||
|
||||
gint (* get_scale_factor) (GdkSurface *surface);
|
||||
int (* get_scale_factor) (GdkSurface *surface);
|
||||
void (* get_unscaled_size) (GdkSurface *surface,
|
||||
int *unscaled_width,
|
||||
int *unscaled_height);
|
||||
@ -163,10 +163,10 @@ struct _GdkSurfaceClass
|
||||
void (* set_opaque_region) (GdkSurface *surface,
|
||||
cairo_region_t *region);
|
||||
void (* set_shadow_width) (GdkSurface *surface,
|
||||
gint left,
|
||||
gint right,
|
||||
gint top,
|
||||
gint bottom);
|
||||
int left,
|
||||
int right,
|
||||
int top,
|
||||
int bottom);
|
||||
GdkGLContext *(*create_gl_context) (GdkSurface *surface,
|
||||
gboolean attached,
|
||||
GdkGLContext *share,
|
||||
|
@ -62,8 +62,8 @@ G_BEGIN_DECLS
|
||||
*/
|
||||
struct _GdkPoint
|
||||
{
|
||||
gint x;
|
||||
gint y;
|
||||
int x;
|
||||
int y;
|
||||
};
|
||||
typedef struct _GdkPoint GdkPoint;
|
||||
|
||||
@ -405,8 +405,8 @@ typedef struct _GdkKeymapKey GdkKeymapKey;
|
||||
struct _GdkKeymapKey
|
||||
{
|
||||
guint keycode;
|
||||
gint group;
|
||||
gint level;
|
||||
int group;
|
||||
int level;
|
||||
};
|
||||
|
||||
|
||||
|
@ -609,7 +609,7 @@
|
||||
{
|
||||
GdkMacosSurface *surface = gdk_surface;
|
||||
NSRect rect;
|
||||
gint shadow_top;
|
||||
int shadow_top;
|
||||
|
||||
/* Allow the window to move up "shadow_top" more than normally allowed
|
||||
* by the default impl. This makes it possible to move windows with
|
||||
|
@ -32,7 +32,7 @@ static gint64 host_to_frame_clock_time (gint64 host_time);
|
||||
|
||||
static gboolean
|
||||
gdk_display_link_source_prepare (GSource *source,
|
||||
gint *timeout_)
|
||||
int *timeout_)
|
||||
{
|
||||
GdkDisplayLinkSource *impl = (GdkDisplayLinkSource *)source;
|
||||
gint64 now;
|
||||
|
@ -72,8 +72,8 @@ gdk_macos_device_surface_at_position (GdkDevice *device,
|
||||
GdkMacosDisplay *display;
|
||||
GdkMacosSurface *surface;
|
||||
NSPoint point;
|
||||
gint x;
|
||||
gint y;
|
||||
int x;
|
||||
int y;
|
||||
|
||||
g_assert (GDK_IS_MACOS_DEVICE (device));
|
||||
g_assert (win_x != NULL);
|
||||
|
@ -78,7 +78,7 @@ _gdk_macos_settings_load (GdkMacosSettings *settings)
|
||||
settings->double_click_time = fval * 1000;
|
||||
|
||||
name = [[NSFont systemFontOfSize:0] familyName];
|
||||
pt_size = (gint)[[NSFont userFontOfSize:0] pointSize];
|
||||
pt_size = (int)[[NSFont userFontOfSize:0] pointSize];
|
||||
/* Let's try to use the "views" font size (12pt) by default. This is
|
||||
* used for lists/text/other "content" which is the largest parts of
|
||||
* apps, using the "regular control" size (13pt) looks a bit out of
|
||||
|
@ -248,7 +248,7 @@ gdk_macos_drag_drop_performed (GdkDrag *drag,
|
||||
|
||||
static void
|
||||
gdk_drag_get_current_actions (GdkModifierType state,
|
||||
gint button,
|
||||
int button,
|
||||
GdkDragAction actions,
|
||||
GdkDragAction *suggested_action,
|
||||
GdkDragAction *possible_actions)
|
||||
@ -414,7 +414,7 @@ gdk_dnd_handle_key_event (GdkDrag *drag,
|
||||
GdkMacosDrag *self = GDK_MACOS_DRAG (drag);
|
||||
GdkModifierType state;
|
||||
GdkDevice *pointer;
|
||||
gint dx, dy;
|
||||
int dx, dy;
|
||||
|
||||
dx = dy = 0;
|
||||
state = gdk_event_get_modifier_state (event);
|
||||
|
@ -89,7 +89,7 @@ static gboolean run_loop_polling_async = FALSE;
|
||||
/* Between run_loop_before_waiting() and run_loop_after_waiting();
|
||||
* max_prioritiy to pass to g_main_loop_check()
|
||||
*/
|
||||
static gint run_loop_max_priority;
|
||||
static int run_loop_max_priority;
|
||||
|
||||
/* Timer that we've added to wake up the run loop when a GLib timeout
|
||||
*/
|
||||
@ -148,7 +148,7 @@ static NSAutoreleasePool *autorelease_pool;
|
||||
* a run loop iteration, so we need to detect that and avoid triggering
|
||||
* our "run the GLib main looop while the run loop is active machinery.
|
||||
*/
|
||||
static gint getting_events = 0;
|
||||
static int getting_events = 0;
|
||||
|
||||
/************************************************************
|
||||
********* Select Thread *********
|
||||
@ -199,7 +199,7 @@ static GPollFD *next_pollfds;
|
||||
static guint next_n_pollfds;
|
||||
|
||||
/* Pipe used to wake up the select thread */
|
||||
static gint select_thread_wakeup_pipe[2];
|
||||
static int select_thread_wakeup_pipe[2];
|
||||
|
||||
/* Run loop source used to wake up the main thread */
|
||||
static CFRunLoopSourceRef select_main_thread_source;
|
||||
@ -365,7 +365,7 @@ dump_poll_result (GPollFD *ufds,
|
||||
guint nfds)
|
||||
{
|
||||
GString *s;
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
s = g_string_new ("");
|
||||
for (i = 0; i < nfds; i++)
|
||||
@ -393,7 +393,7 @@ pollfds_equal (GPollFD *old_pollfds,
|
||||
GPollFD *new_pollfds,
|
||||
guint new_n_pollfds)
|
||||
{
|
||||
gint i;
|
||||
int i;
|
||||
|
||||
if (old_n_pollfds != new_n_pollfds)
|
||||
return FALSE;
|
||||
@ -417,15 +417,15 @@ pollfds_equal (GPollFD *old_pollfds,
|
||||
* 0: No file descriptors ready, asynchronous poll not needed
|
||||
* > 0: Number of file descriptors ready
|
||||
*/
|
||||
static gint
|
||||
static int
|
||||
select_thread_start_poll (GPollFD *ufds,
|
||||
guint nfds,
|
||||
gint timeout)
|
||||
int timeout)
|
||||
{
|
||||
gint n_ready;
|
||||
int n_ready;
|
||||
gboolean have_new_pollfds = FALSE;
|
||||
gint poll_fd_index = -1;
|
||||
gint i;
|
||||
int poll_fd_index = -1;
|
||||
int i;
|
||||
|
||||
for (i = 0; i < nfds; i++)
|
||||
if (ufds[i].fd == -1)
|
||||
@ -575,8 +575,8 @@ select_thread_start_poll (GPollFD *ufds,
|
||||
static int
|
||||
select_thread_collect_poll (GPollFD *ufds, guint nfds)
|
||||
{
|
||||
gint i;
|
||||
gint n_ready = 0;
|
||||
int i;
|
||||
int n_ready = 0;
|
||||
|
||||
SELECT_THREAD_LOCK ();
|
||||
|
||||
@ -640,7 +640,7 @@ _gdk_macos_event_source_get_pending (void)
|
||||
|
||||
static gboolean
|
||||
gdk_macos_event_source_prepare (GSource *source,
|
||||
gint *timeout)
|
||||
int *timeout)
|
||||
{
|
||||
GdkMacosEventSource *event_source = (GdkMacosEventSource *)source;
|
||||
gboolean retval;
|
||||
@ -737,14 +737,14 @@ static GSourceFuncs event_funcs = {
|
||||
********* Our Poll Function *********
|
||||
************************************************************/
|
||||
|
||||
static gint
|
||||
static int
|
||||
poll_func (GPollFD *ufds,
|
||||
guint nfds,
|
||||
gint timeout_)
|
||||
int timeout_)
|
||||
{
|
||||
NSEvent *event;
|
||||
NSDate *limit_date;
|
||||
gint n_ready;
|
||||
int n_ready;
|
||||
|
||||
static GPollFD *last_ufds;
|
||||
|
||||
@ -808,12 +808,12 @@ poll_func (GPollFD *ufds,
|
||||
/* Wrapper around g_main_context_query() that handles reallocating
|
||||
* run_loop_pollfds up to the proper size
|
||||
*/
|
||||
static gint
|
||||
static int
|
||||
query_main_context (GMainContext *context,
|
||||
int max_priority,
|
||||
int *timeout)
|
||||
{
|
||||
gint nfds;
|
||||
int nfds;
|
||||
|
||||
if (!run_loop_pollfds)
|
||||
{
|
||||
@ -869,8 +869,8 @@ static void
|
||||
run_loop_before_sources (void)
|
||||
{
|
||||
GMainContext *context = g_main_context_default ();
|
||||
gint max_priority;
|
||||
gint nfds;
|
||||
int max_priority;
|
||||
int nfds;
|
||||
|
||||
/* Before we let the CFRunLoop process sources, we want to check if there
|
||||
* are any pending GLib main loop sources more urgent than
|
||||
@ -909,8 +909,8 @@ static void
|
||||
run_loop_before_waiting (void)
|
||||
{
|
||||
GMainContext *context = g_main_context_default ();
|
||||
gint timeout;
|
||||
gint n_ready;
|
||||
int timeout;
|
||||
int n_ready;
|
||||
|
||||
/* At this point, the CFRunLoop is ready to wait. We start a GMain loop
|
||||
* iteration by calling the check() and query() stages. We start a
|
||||
|
@ -394,12 +394,12 @@ gdk_macos_keymap_lookup_key (GdkKeymap *keymap,
|
||||
|
||||
static guint
|
||||
translate_keysym (guint hardware_keycode,
|
||||
gint group,
|
||||
int group,
|
||||
GdkModifierType state,
|
||||
gint *effective_group,
|
||||
gint *effective_level)
|
||||
int *effective_group,
|
||||
int *effective_level)
|
||||
{
|
||||
gint level;
|
||||
int level;
|
||||
guint tmp_keyval;
|
||||
|
||||
level = (state & GDK_SHIFT_MASK) ? 1 : 0;
|
||||
@ -463,7 +463,7 @@ gdk_macos_keymap_get_entries_for_keycode (GdkKeymap *keymap,
|
||||
guint hardware_keycode,
|
||||
GdkKeymapKey **keys,
|
||||
guint **keyvals,
|
||||
gint *n_entries)
|
||||
int *n_entries)
|
||||
{
|
||||
GArray *keys_array;
|
||||
GArray *keyvals_array;
|
||||
@ -527,10 +527,10 @@ static gboolean
|
||||
gdk_macos_keymap_translate_keyboard_state (GdkKeymap *keymap,
|
||||
guint hardware_keycode,
|
||||
GdkModifierType state,
|
||||
gint group,
|
||||
int group,
|
||||
guint *keyval,
|
||||
gint *effective_group,
|
||||
gint *level,
|
||||
int *effective_group,
|
||||
int *level,
|
||||
GdkModifierType *consumed_modifiers)
|
||||
{
|
||||
guint tmp_keyval;
|
||||
|
@ -81,10 +81,10 @@ const char *_gdk_macos_surface_get_title (GdkMacosSurface
|
||||
void _gdk_macos_surface_set_title (GdkMacosSurface *self,
|
||||
const gchar *title);
|
||||
void _gdk_macos_surface_get_shadow (GdkMacosSurface *self,
|
||||
gint *top,
|
||||
gint *right,
|
||||
gint *bottom,
|
||||
gint *left);
|
||||
int *top,
|
||||
int *right,
|
||||
int *bottom,
|
||||
int *left);
|
||||
NSView *_gdk_macos_surface_get_view (GdkMacosSurface *self);
|
||||
gboolean _gdk_macos_surface_get_modal_hint (GdkMacosSurface *self);
|
||||
void _gdk_macos_surface_set_modal_hint (GdkMacosSurface *self,
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user