diff options
Diffstat (limited to 'widget/gtk/gtkdrawing.h')
-rw-r--r-- | widget/gtk/gtkdrawing.h | 49 |
1 files changed, 17 insertions, 32 deletions
diff --git a/widget/gtk/gtkdrawing.h b/widget/gtk/gtkdrawing.h index 4ca226d9c7..227a33d9a9 100644 --- a/widget/gtk/gtkdrawing.h +++ b/widget/gtk/gtkdrawing.h @@ -69,38 +69,39 @@ struct MozGtkSize { } }; -typedef struct { +struct ToggleGTKMetrics { bool initialized; MozGtkSize minSizeWithBorder; GtkBorder borderAndPadding; -} ToggleGTKMetrics; +}; -typedef struct { - MozGtkSize minSizeWithBorder; - gint iconXPosition; - gint iconYPosition; -} ToolbarButtonGTKMetrics; +struct ToolbarButtonGTKMetrics { + MozGtkSize minSizeWithBorder{}; + gint iconXPosition = 0; + gint iconYPosition = 0; +}; #define TOOLBAR_BUTTONS 3 -typedef struct { - bool initialized; +struct ToolbarGTKMetrics { + bool initialized = false; + gint inlineSpacing = 0; ToolbarButtonGTKMetrics button[TOOLBAR_BUTTONS]; -} ToolbarGTKMetrics; +}; -typedef struct { +struct CSDWindowDecorationSize { bool initialized; GtkBorder decorationSize; -} CSDWindowDecorationSize; +}; /** flags for tab state **/ -typedef enum { +enum GtkTabFlags { /* first eight bits are used to pass a margin */ MOZ_GTK_TAB_MARGIN_MASK = 0xFF, /* the first tab in the group */ MOZ_GTK_TAB_FIRST = 1 << 9, /* the selected tab */ MOZ_GTK_TAB_SELECTED = 1 << 10 -} GtkTabFlags; +}; /*** result/error codes ***/ #define MOZ_GTK_SUCCESS 0 @@ -211,8 +212,6 @@ enum WidgetNodeType : int { MOZ_GTK_TREEVIEW_VIEW, /* Paints treeheader cells */ MOZ_GTK_TREE_HEADER_CELL, - /* Paints an expander for a GtkTreeView */ - MOZ_GTK_TREEVIEW_EXPANDER, /* Paints the background of menus, context menus. */ MOZ_GTK_MENUPOPUP, /* Menubar for -moz-headerbar colors */ @@ -458,22 +457,6 @@ void moz_gtk_get_entry_min_height(gint* min_content_height, gint moz_gtk_get_toolbar_separator_width(gint* size); /** - * Get the size of a regular GTK expander that shows/hides content - * size: [OUT] the size of the GTK expander, size = width = height. - * - * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise - */ -gint moz_gtk_get_expander_size(gint* size); - -/** - * Get the size of a treeview's expander (we call them twisties) - * size: [OUT] the size of the GTK expander, size = width = height. - * - * returns: MOZ_GTK_SUCCESS if there was no error, an error code otherwise - */ -gint moz_gtk_get_treeview_expander_size(gint* size); - -/** * Get the desired size of a splitter * orientation: [IN] GTK_ORIENTATION_HORIZONTAL or GTK_ORIENTATION_VERTICAL * size: [OUT] width or height of the splitter handle @@ -493,6 +476,8 @@ gint moz_gtk_get_tab_thickness(WidgetNodeType aNodeType); const ToolbarButtonGTKMetrics* GetToolbarButtonMetrics( WidgetNodeType aAppearance); +gint moz_gtk_get_titlebar_button_spacing(); + /** * Get toolbar button layout. * aButtonLayout: [OUT] An array which will be filled by ButtonLayout |