]> Pileus Git - ~andy/gtk/blobdiff - gtk/gtkstylecontext.h
a11y: Emit text-changed signals directly
[~andy/gtk] / gtk / gtkstylecontext.h
index f431b4a44048b0ba1b1b1f14afc7cc4c4a6ae173..35655f28d6ffdb97d2136280ffc7b70f65797dd3 100644 (file)
  * 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 <http://www.gnu.org/licenses/>.
  */
 
+#ifndef __GTK_STYLE_CONTEXT_H__
+#define __GTK_STYLE_CONTEXT_H__
+
 #if !defined (__GTK_H_INSIDE__) && !defined (GTK_COMPILATION)
 #error "Only <gtk/gtk.h> can be included directly."
 #endif
 
-#ifndef __GTK_STYLE_CONTEXT_H__
-#define __GTK_STYLE_CONTEXT_H__
-
-#include <glib-object.h>
+#include <gtk/gtkborder.h>
 #include <gtk/gtkcsssection.h>
 #include <gtk/gtkstyleprovider.h>
-#include <gtk/gtkwidgetpath.h>
-#include <gtk/gtkborder.h>
+#include <gtk/gtktypes.h>
 #include <atk/atk.h>
 
 G_BEGIN_DECLS
@@ -40,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;
 
@@ -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:
  *
@@ -648,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 */
 
 /**
@@ -678,26 +748,6 @@ struct _GtkStyleContextClass
  */
 #define GTK_STYLE_REGION_TAB "tab"
 
-/**
- * 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"
-
-
 GType gtk_style_context_get_type (void) G_GNUC_CONST;
 
 GtkStyleContext * gtk_style_context_new (void);
@@ -735,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);
@@ -785,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,
@@ -797,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 */
@@ -823,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);
@@ -949,7 +1016,7 @@ void        gtk_render_insertion_cursor
                                     PangoLayout         *layout,
                                     int                  index,
                                     PangoDirection       direction);
-
+GDK_DEPRECATED_IN_3_4
 void   gtk_draw_insertion_cursor    (GtkWidget          *widget,
                                      cairo_t            *cr,
                                      const GdkRectangle *location,