Commit e5317f0f authored by Matthias Clasen's avatar Matthias Clasen

Improve struct packing in various places

parent d137f74f
......@@ -141,12 +141,14 @@ struct _GtkApplicationPrivate
{
GList *windows;
gboolean register_session;
GMenuModel *app_menu;
GMenuModel *menubar;
gboolean register_session;
#ifdef GDK_WINDOWING_X11
guint next_id;
GDBusConnection *session_bus;
const gchar *application_id;
const gchar *object_path;
......@@ -154,10 +156,8 @@ struct _GtkApplicationPrivate
gchar *app_menu_path;
guint app_menu_id;
gchar *menubar_path;
guint menubar_id;
guint next_id;
gchar *menubar_path;
GDBusProxy *sm_proxy;
GDBusProxy *client_proxy;
......
......@@ -221,9 +221,9 @@ struct _GtkApplicationWindowPrivate
GSList *accel_closures;
guint accel_map_changed_id;
gboolean show_menubar;
GMenu *app_menu_section;
GMenu *menubar_section;
gboolean show_menubar;
GDBusConnection *session;
gchar *object_path;
......
......@@ -236,8 +236,8 @@ struct _GtkContainerPrivate
{
GtkWidget *focus_child;
guint resize_handler;
GdkFrameClock *resize_clock;
guint resize_handler;
guint border_width : 16;
......
......@@ -45,10 +45,10 @@ struct _GtkCssAnimation
GtkCssValue *ease;
gint64 timestamp; /* elapsed time when paused, start time when playing (can be negative) */
gint64 duration; /* duration of 1 cycle */
double iteration_count;
GtkCssDirection direction;
GtkCssPlayState play_state;
GtkCssFillMode fill_mode;
double iteration_count;
};
struct _GtkCssAnimationClass
......
......@@ -38,9 +38,10 @@ struct _GtkCssImageScaled
{
GtkCssImage parent;
int scale;
GtkCssImage **images;
int n_images;
int scale;
};
struct _GtkCssImageScaledClass
......
......@@ -234,10 +234,9 @@ struct _EntryIconInfo
guint in_drag : 1;
guint pressed : 1;
GtkIconHelper *icon_helper;
GtkTargetList *target_list;
GdkDragAction actions;
GtkTargetList *target_list;
GtkIconHelper *icon_helper;
};
struct _GtkEntryPasswordHint
......
......@@ -34,7 +34,6 @@ struct _GtkEntryCompletionPrivate
GtkTreeViewColumn *column;
GtkTreeModelFilter *filter_model;
GtkListStore *actions;
gboolean first_sel_changed;
GtkCellArea *cell_area;
GtkEntryCompletionMatchFunc match_func;
......@@ -43,7 +42,6 @@ struct _GtkEntryCompletionPrivate
gint minimum_key_length;
gint text_column;
gint current_selected;
gchar *case_normalized_key;
......@@ -57,6 +55,9 @@ struct _GtkEntryCompletionPrivate
gulong changed_id;
gulong insert_text_id;
gint current_selected;
guint first_sel_changed : 1;
guint ignore_enter : 1;
guint has_completion : 1;
guint inline_completion : 1;
......
......@@ -136,13 +136,13 @@ struct _GtkImagePrivate
{
GtkIconHelper *icon_helper;
gint animation_timeout;
GdkPixbufAnimationIter *animation_iter;
gint animation_timeout;
float baseline_align;
gchar *filename; /* Only used with GTK_IMAGE_ANIMATION, GTK_IMAGE_PIXBUF */
gchar *resource_path; /* Only used with GTK_IMAGE_PIXBUF */
float baseline_align;
};
......
......@@ -136,14 +136,14 @@ typedef struct {
struct _GtkLevelBarPrivate {
GtkOrientation orientation;
GtkLevelBarMode bar_mode;
gdouble min_value;
gdouble max_value;
gdouble cur_value;
GList *offsets;
GtkLevelBarMode bar_mode;
guint inverted : 1;
};
......
......@@ -160,9 +160,9 @@ struct _GtkMenuButtonPrivate
GtkMenuButtonShowMenuCallback func;
gpointer user_data;
GtkArrowType arrow_type;
GtkWidget *align_widget;
gpointer arrow_widget;
GtkArrowType arrow_type;
};
enum
......
......@@ -144,16 +144,12 @@ struct _GtkPlacesSidebar {
/* DnD */
GList *drag_list; /* list of GFile */
gboolean drag_data_received;
int drag_data_info;
gboolean drop_occured;
GtkWidget *popup_menu;
/* volume mounting - delayed open process */
gboolean mounting;
GtkPlacesOpenFlags go_to_after_mount_open_flags;
GtkWidget *popup_menu;
GSList *shortcuts;
GDBusProxy *hostnamed_proxy;
......@@ -165,9 +161,12 @@ struct _GtkPlacesSidebar {
DropState drop_state;
int new_bookmark_index;
guint drag_leave_timeout_id;
guint switch_location_timer;
char *drop_target_uri;
guint switch_location_timer;
guint mounting : 1;
guint drag_data_received : 1;
guint drop_occured : 1;
guint show_desktop : 1;
guint show_connect_to_server : 1;
};
......
......@@ -63,14 +63,15 @@ struct _GtkRBNode
{
guint flags : 14;
GtkRBNode *left;
GtkRBNode *right;
GtkRBNode *parent;
/* count is the number of nodes beneath us, plus 1 for ourselves.
* i.e. node->left->count + node->right->count + 1
*/
gint count;
GtkRBNode *left;
GtkRBNode *right;
GtkRBNode *parent;
/* count the number of total nodes beneath us, including nodes
* of children trees.
* i.e. node->left->count + node->right->count + node->children->root->count + 1
......
......@@ -365,8 +365,8 @@ struct _GtkStyleContextPrivate
GtkStyleInfo *info;
gint scale;
GdkFrameClock *frame_clock;
guint frame_clock_update_id;
GdkFrameClock *frame_clock;
GtkCssChange relevant_changes;
GtkCssChange pending_changes;
......
......@@ -228,8 +228,8 @@ struct _SortElt
gint offset;
gint ref_count;
gint zero_ref_count;
GSequenceIter *siter; /* iter into seq */
gint old_index; /* used while sorting */
GSequenceIter *siter; /* iter into seq */
};
struct _SortLevel
......@@ -247,8 +247,8 @@ struct _SortData
gpointer sort_data;
GtkTreePath *parent_path;
gint parent_path_depth;
gint *parent_path_indices;
gint parent_path_depth;
};
/* Properties */
......
......@@ -65,12 +65,12 @@
struct _GtkTreeStorePrivate
{
gint stamp;
GtkSortType order;
gpointer root;
gpointer last;
gint n_columns;
gint sort_column_id;
GList *sort_list;
GtkSortType order;
GType *column_headers;
GtkTreeIterCompareFunc default_sort_func;
gpointer default_sort_data;
......
......@@ -294,6 +294,8 @@ struct _GtkTreeViewPrivate
GList *children;
gint width;
guint presize_handler_tick_cb;
/* Adjustments */
GtkAdjustment *hadjustment;
GtkAdjustment *vadjustment;
......@@ -313,7 +315,6 @@ struct _GtkTreeViewPrivate
/* we cache it for simplicity of the code */
gint dy;
guint presize_handler_tick_cb;
guint validate_rows_timer;
guint scroll_sync_timer;
......@@ -364,9 +365,9 @@ struct _GtkTreeViewPrivate
GtkTreeSelection *selection;
/* Header information */
gint header_height;
gint n_columns;
GList *columns;
gint header_height;
GtkTreeViewColumnDropFunc column_drop_func;
gpointer column_drop_func_data;
......@@ -376,6 +377,9 @@ struct _GtkTreeViewPrivate
gint prev_width_before_expander;
/* Scroll timeout (e.g. during dnd, rubber banding) */
guint scroll_timeout;
/* Interactive Header reordering */
GdkWindow *drag_window;
GdkWindow *drag_highlight_window;
......@@ -396,9 +400,6 @@ struct _GtkTreeViewPrivate
gpointer destroy_count_data;
GDestroyNotify destroy_count_destroy;
/* Scroll timeout (e.g. during dnd, rubber banding) */
guint scroll_timeout;
/* Row drag-and-drop */
GtkTreeRowReference *drag_dest_row;
GtkTreeViewDropPosition drag_dest_pos;
......@@ -411,15 +412,15 @@ struct _GtkTreeViewPrivate
gint rubber_band_extend;
gint rubber_band_modify;
/* fixed height */
gint fixed_height;
GtkRBNode *rubber_band_start_node;
GtkRBTree *rubber_band_start_tree;
GtkRBNode *rubber_band_end_node;
GtkRBTree *rubber_band_end_tree;
/* fixed height */
gint fixed_height;
/* Scroll-to functionality when unrealized */
GtkTreeRowReference *scroll_to_path;
GtkTreeViewColumn *scroll_to_column;
......
......@@ -133,8 +133,8 @@ struct _GtkTreeViewColumnPrivate
GtkWidget *arrow;
GtkWidget *alignment;
GdkWindow *window;
gfloat xalign;
gulong property_changed_signal;
gfloat xalign;
/* Sizing fields */
/* see gtk+/doc/tree-column-sizing.txt for more information on them */
......
......@@ -524,9 +524,9 @@ struct _GtkWidgetPrivate
struct _GtkWidgetClassPrivate
{
GtkWidgetTemplate *template;
GType accessible_type;
AtkRole accessible_role;
GtkWidgetTemplate *template;
};
enum {
......
......@@ -89,10 +89,10 @@ struct GtkPathElement
{
GType type;
GQuark name;
guint sibling_index;
GHashTable *regions;
GArray *classes;
GtkWidgetPath *siblings;
guint sibling_index;
};
struct _GtkWidgetPath
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment