X-Git-Url: http://pileus.org/git/?a=blobdiff_plain;f=gtk%2Fgtkstylecontext.h;h=35655f28d6ffdb97d2136280ffc7b70f65797dd3;hb=5bbbc47a4c306653e8347f7afb85a940a503f755;hp=33cf5560faf4e73ca7cdb0f167a28aff09513496;hpb=8d3f7e3a4a5963005cff1609f4b78f0c8856d585;p=~andy%2Fgtk diff --git a/gtk/gtkstylecontext.h b/gtk/gtkstylecontext.h index 33cf5560f..35655f28d 100644 --- a/gtk/gtkstylecontext.h +++ b/gtk/gtkstylecontext.h @@ -12,22 +12,20 @@ * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public - * License along with this library; if not, write to the - * Free Software Foundation, Inc., 59 Temple Place - Suite 330, - * Boston, MA 02111-1307, USA. + * License along with this library. If not, see . */ +#ifndef __GTK_STYLE_CONTEXT_H__ +#define __GTK_STYLE_CONTEXT_H__ + #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION) #error "Only can be included directly." #endif -#ifndef __GTK_STYLE_CONTEXT_H__ -#define __GTK_STYLE_CONTEXT_H__ - -#include -#include -#include #include +#include +#include +#include #include G_BEGIN_DECLS @@ -39,7 +37,6 @@ G_BEGIN_DECLS #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)) -typedef struct _GtkStyleContext GtkStyleContext; typedef struct _GtkStyleContextClass GtkStyleContextClass; typedef struct _GtkStyleContextPrivate GtkStyleContextPrivate; @@ -148,7 +145,6 @@ struct _GtkStyleContextClass */ #define GTK_STYLE_PROPERTY_BACKGROUND_IMAGE "background-image" - /* Predefined set of CSS classes */ /** @@ -161,6 +157,16 @@ struct _GtkStyleContextClass */ #define GTK_STYLE_CLASS_CELL "cell" +/** + * GTK_STYLE_CLASS_DIM_LABEL: + * + * A CSS class to match dimmed labels. + * + * This should be used for toning down right aligned labels as + * compared to the entry value. + */ +#define GTK_STYLE_CLASS_DIM_LABEL "dim-label" + /** * GTK_STYLE_CLASS_ENTRY: * @@ -334,6 +340,16 @@ struct _GtkStyleContextClass */ #define GTK_STYLE_CLASS_SCROLLBAR "scrollbar" +/** + * GTK_STYLE_CLASS_SCROLLBARS_JUNCTION: + * + * A CSS class to match the junction area between an horizontal + * and vertical scrollbar, when they're both shown. + * + * This is used in #GtkScrolledWindow. + */ +#define GTK_STYLE_CLASS_SCROLLBARS_JUNCTION "scrollbars-junction" + /** * GTK_STYLE_CLASS_SCALE: * @@ -389,6 +405,14 @@ struct _GtkStyleContextClass */ #define GTK_STYLE_CLASS_RAISED "raised" +/** + * GTK_STYLE_CLASS_LINKED: + * + * A CSS class to match a linked area, such as a box containing buttons + * belonging to the same control. + */ +#define GTK_STYLE_CLASS_LINKED "linked" + /** * GTK_STYLE_CLASS_GRIP: * @@ -640,6 +664,60 @@ struct _GtkStyleContextClass */ #define GTK_STYLE_CLASS_RIGHT "right" +/** + * GTK_STYLE_CLASS_PULSE: + * + * A CSS class to use when rendering a pulse in an indeterminate progress bar. + * + * This is used by #GtkProgressBar and #GtkEntry. + */ +#define GTK_STYLE_CLASS_PULSE "pulse" + +/** + * GTK_STYLE_CLASS_ARROW: + * + * A CSS class used when rendering an arrow element. + * + * Note that #gtk_render_arrow automatically adds this style class + * to the style context when rendering an arrow element. + */ +#define GTK_STYLE_CLASS_ARROW "arrow" + +/** + * GTK_STYLE_CLASS_OSD: + * + * A CSS class used when rendering an OSD (On Screen Display) element, + * on top of another container. + */ +#define GTK_STYLE_CLASS_OSD "osd" + +/** + * GTK_STYLE_CLASS_LEVEL_BAR: + * + * A CSS class used when rendering a level indicator, such + * as a battery charge level, or a password strength. + * + * This is used by #GtkLevelBar. + */ +#define GTK_STYLE_CLASS_LEVEL_BAR "level-bar" + +/** + * GTK_STYLE_CLASS_CURSOR_HANDLE: + * + * A CSS class used when rendering a drag handle for + * text selection. + */ +#define GTK_STYLE_CLASS_CURSOR_HANDLE "cursor-handle" + +/** + * GTK_STYLE_CLASS_INSERTION_CURSOR: + * + * A CSS class used when rendering a drag handle for + * the insertion cursor position. + */ +#define GTK_STYLE_CLASS_INSERTION_CURSOR "insertion-cursor" + + /* Predefined set of widget regions */ /** @@ -670,7 +748,6 @@ struct _GtkStyleContextClass */ #define GTK_STYLE_REGION_TAB "tab" - GType gtk_style_context_get_type (void) G_GNUC_CONST; GtkStyleContext * gtk_style_context_new (void); @@ -691,6 +768,8 @@ void gtk_style_context_remove_provider (GtkStyleContext *context, void gtk_style_context_save (GtkStyleContext *context); void gtk_style_context_restore (GtkStyleContext *context); +GtkCssSection * gtk_style_context_get_section (GtkStyleContext *context, + const gchar *property); void gtk_style_context_get_property (GtkStyleContext *context, const gchar *property, GtkStateFlags state, @@ -706,6 +785,7 @@ void gtk_style_context_set_state (GtkStyleContext *context, GtkStateFlags flags); GtkStateFlags gtk_style_context_get_state (GtkStyleContext *context); +GDK_DEPRECATED_IN_3_6 gboolean gtk_style_context_state_is_running (GtkStyleContext *context, GtkStateType state, gdouble *progress); @@ -713,6 +793,10 @@ gboolean gtk_style_context_state_is_running (GtkStyleContext *context, void gtk_style_context_set_path (GtkStyleContext *context, GtkWidgetPath *path); const GtkWidgetPath * gtk_style_context_get_path (GtkStyleContext *context); +GDK_AVAILABLE_IN_3_4 +void gtk_style_context_set_parent (GtkStyleContext *context, + GtkStyleContext *parent); +GtkStyleContext *gtk_style_context_get_parent (GtkStyleContext *context); GList * gtk_style_context_list_classes (GtkStyleContext *context); @@ -752,8 +836,17 @@ void gtk_style_context_set_screen (GtkStyleContext *context, GdkScreen *screen); GdkScreen * gtk_style_context_get_screen (GtkStyleContext *context); +GDK_AVAILABLE_IN_3_8 +void gtk_style_context_set_frame_clock (GtkStyleContext *context, + GdkFrameClock *frame_clock); +GDK_AVAILABLE_IN_3_8 +GdkFrameClock *gtk_style_context_get_frame_clock (GtkStyleContext *context); + + +GDK_DEPRECATED_IN_3_8_FOR(gtk_style_context_set_state) void gtk_style_context_set_direction (GtkStyleContext *context, GtkTextDirection direction); +GDK_DEPRECATED_IN_3_8_FOR(gtk_style_context_get_state) GtkTextDirection gtk_style_context_get_direction (GtkStyleContext *context); void gtk_style_context_set_junction_sides (GtkStyleContext *context, @@ -764,20 +857,25 @@ gboolean gtk_style_context_lookup_color (GtkStyleContext *context, const gchar *color_name, GdkRGBA *color); +GDK_DEPRECATED_IN_3_6 void gtk_style_context_notify_state_change (GtkStyleContext *context, GdkWindow *window, gpointer region_id, GtkStateType state, gboolean state_value); +GDK_DEPRECATED_IN_3_6 void gtk_style_context_cancel_animations (GtkStyleContext *context, gpointer region_id); +GDK_DEPRECATED_IN_3_6 void gtk_style_context_scroll_animations (GtkStyleContext *context, GdkWindow *window, gint dx, gint dy); +GDK_DEPRECATED_IN_3_6 void gtk_style_context_push_animatable_region (GtkStyleContext *context, gpointer region_id); +GDK_DEPRECATED_IN_3_6 void gtk_style_context_pop_animatable_region (GtkStyleContext *context); /* Some helper functions to retrieve most common properties */ @@ -790,6 +888,8 @@ void gtk_style_context_get_background_color (GtkStyleContext *context, void gtk_style_context_get_border_color (GtkStyleContext *context, GtkStateFlags state, GdkRGBA *color); + +GDK_DEPRECATED_IN_3_8_FOR(gtk_style_context_get) const PangoFontDescription * gtk_style_context_get_font (GtkStyleContext *context, GtkStateFlags state); @@ -901,11 +1001,28 @@ void gtk_render_activity (GtkStyleContext *context, GdkPixbuf * gtk_render_icon_pixbuf (GtkStyleContext *context, const GtkIconSource *source, GtkIconSize size); +GDK_AVAILABLE_IN_3_2 void gtk_render_icon (GtkStyleContext *context, cairo_t *cr, - GdkPixbuf *pixbuf, + GdkPixbuf *pixbuf, gdouble x, gdouble y); +GDK_AVAILABLE_IN_3_4 +void gtk_render_insertion_cursor + (GtkStyleContext *context, + cairo_t *cr, + gdouble x, + gdouble y, + PangoLayout *layout, + int index, + PangoDirection direction); +GDK_DEPRECATED_IN_3_4 +void gtk_draw_insertion_cursor (GtkWidget *widget, + cairo_t *cr, + const GdkRectangle *location, + gboolean is_primary, + GtkTextDirection direction, + gboolean draw_arrow); /* Accessibility support */ AtkAttributeSet *_gtk_style_context_get_attributes (AtkAttributeSet *attributes,