GtkStyleContext: Add gtk_style_context_new().
This commit is contained in:
@ -5366,6 +5366,7 @@ gtk_style_set_get_type
|
|||||||
<FILE>gtkstylecontext</FILE>
|
<FILE>gtkstylecontext</FILE>
|
||||||
<TITLE>GtkStyleContext</TITLE>
|
<TITLE>GtkStyleContext</TITLE>
|
||||||
GtkStyleContext
|
GtkStyleContext
|
||||||
|
gtk_style_context_new
|
||||||
gtk_style_context_add_provider
|
gtk_style_context_add_provider
|
||||||
gtk_style_context_add_provider_for_screen
|
gtk_style_context_add_provider_for_screen
|
||||||
gtk_style_context_get
|
gtk_style_context_get
|
||||||
|
|||||||
@ -984,6 +984,29 @@ style_provider_remove (GList **list,
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* gtk_style_context_new:
|
||||||
|
*
|
||||||
|
* Creates a standalone #GtkStyleContext, this style context
|
||||||
|
* won't be attached to any widget nor screen, so you may want
|
||||||
|
* to call gtk_style_context_set_path() and
|
||||||
|
* gtk_style_context_set_screen() yourself.
|
||||||
|
*
|
||||||
|
* <note>
|
||||||
|
* This function is only useful when using the theming layer
|
||||||
|
* separated from GTK+, if you are using #GtkStyleContext to
|
||||||
|
* theme #GtkWidget<!-- -->s, use gtk_widget_get_style_context()
|
||||||
|
* in order to get a style context ready to theme the widget.
|
||||||
|
* </note>
|
||||||
|
*
|
||||||
|
* Returns: A newly created #GtkStyleContext.
|
||||||
|
**/
|
||||||
|
GtkStyleContext *
|
||||||
|
gtk_style_context_new (void)
|
||||||
|
{
|
||||||
|
return g_object_new (GTK_TYPE_STYLE_CONTEXT, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* gtk_style_context_add_provider:
|
* gtk_style_context_add_provider:
|
||||||
* @context: a #GtkStyleContext
|
* @context: a #GtkStyleContext
|
||||||
|
|||||||
@ -33,16 +33,16 @@ G_BEGIN_DECLS
|
|||||||
#define GTK_IS_STYLE_CONTEXT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GTK_TYPE_STYLE_CONTEXT))
|
#define GTK_IS_STYLE_CONTEXT_CLASS(c) (G_TYPE_CHECK_CLASS_TYPE ((c), GTK_TYPE_STYLE_CONTEXT))
|
||||||
#define GTK_STYLE_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_STYLE_CONTEXT, GtkStyleContextClass))
|
#define GTK_STYLE_CONTEXT_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_TYPE_STYLE_CONTEXT, GtkStyleContextClass))
|
||||||
|
|
||||||
typedef struct _GtkStyleContext GtkStyleContext;
|
typedef struct GtkStyleContext GtkStyleContext;
|
||||||
typedef struct _GtkStyleContextClass GtkStyleContextClass;
|
typedef struct GtkStyleContextClass GtkStyleContextClass;
|
||||||
|
|
||||||
struct _GtkStyleContext
|
struct GtkStyleContext
|
||||||
{
|
{
|
||||||
GObject parent_object;
|
GObject parent_object;
|
||||||
gpointer priv;
|
gpointer priv;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _GtkStyleContextClass
|
struct GtkStyleContextClass
|
||||||
{
|
{
|
||||||
GObjectClass parent_class;
|
GObjectClass parent_class;
|
||||||
|
|
||||||
@ -51,6 +51,8 @@ struct _GtkStyleContextClass
|
|||||||
|
|
||||||
GType gtk_style_context_get_type (void) G_GNUC_CONST;
|
GType gtk_style_context_get_type (void) G_GNUC_CONST;
|
||||||
|
|
||||||
|
GtkStyleContext * gtk_style_context_new (void);
|
||||||
|
|
||||||
void gtk_style_context_add_provider_for_screen (GdkScreen *screen,
|
void gtk_style_context_add_provider_for_screen (GdkScreen *screen,
|
||||||
GtkStyleProvider *provider,
|
GtkStyleProvider *provider,
|
||||||
guint priority);
|
guint priority);
|
||||||
@ -82,9 +84,9 @@ void gtk_style_context_set_state (GtkStyleContext *context,
|
|||||||
GtkStateFlags flags);
|
GtkStateFlags flags);
|
||||||
GtkStateFlags gtk_style_context_get_state (GtkStyleContext *context);
|
GtkStateFlags gtk_style_context_get_state (GtkStyleContext *context);
|
||||||
|
|
||||||
gboolean gtk_style_context_state_is_running (GtkStyleContext *context,
|
gboolean gtk_style_context_is_state_set (GtkStyleContext *context,
|
||||||
GtkStateType state,
|
GtkStateType state,
|
||||||
gdouble *progress);
|
gdouble *progress);
|
||||||
|
|
||||||
void gtk_style_context_set_path (GtkStyleContext *context,
|
void gtk_style_context_set_path (GtkStyleContext *context,
|
||||||
GtkWidgetPath *path);
|
GtkWidgetPath *path);
|
||||||
@ -146,8 +148,6 @@ void gtk_style_context_push_animatable_region (GtkStyleContext *context,
|
|||||||
gpointer region_id);
|
gpointer region_id);
|
||||||
void gtk_style_context_pop_animatable_region (GtkStyleContext *context);
|
void gtk_style_context_pop_animatable_region (GtkStyleContext *context);
|
||||||
|
|
||||||
void gtk_style_context_invalidate (GtkStyleContext *context);
|
|
||||||
void gtk_style_context_reset_widgets (GdkScreen *screen);
|
|
||||||
|
|
||||||
/* Semi-private API */
|
/* Semi-private API */
|
||||||
const GValue * _gtk_style_context_peek_style_property (GtkStyleContext *context,
|
const GValue * _gtk_style_context_peek_style_property (GtkStyleContext *context,
|
||||||
@ -158,6 +158,23 @@ void _gtk_style_context_coalesce_animation_areas (GtkStyleContext *c
|
|||||||
gint rel_x,
|
gint rel_x,
|
||||||
gint rel_y);
|
gint rel_y);
|
||||||
|
|
||||||
|
/* Animation for state changes */
|
||||||
|
void gtk_style_context_state_transition_start (GtkStyleContext *context,
|
||||||
|
gpointer identifier,
|
||||||
|
GtkWidget *widget,
|
||||||
|
GtkStateType state,
|
||||||
|
gboolean value,
|
||||||
|
GdkRectangle *rect);
|
||||||
|
void gtk_style_context_state_transition_update (GtkStyleContext *context,
|
||||||
|
gpointer identifier,
|
||||||
|
GdkRectangle *rect,
|
||||||
|
GtkStateType state);
|
||||||
|
void gtk_style_context_state_transition_stop (GtkStyleContext *context,
|
||||||
|
gpointer identifier);
|
||||||
|
|
||||||
|
void gtk_style_context_invalidate (GtkStyleContext *context);
|
||||||
|
void gtk_style_context_reset_widgets (GdkScreen *screen);
|
||||||
|
|
||||||
/* Paint methods */
|
/* Paint methods */
|
||||||
void gtk_render_check (GtkStyleContext *context,
|
void gtk_render_check (GtkStyleContext *context,
|
||||||
cairo_t *cr,
|
cairo_t *cr,
|
||||||
|
|||||||
Reference in New Issue
Block a user