* 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/>.
*/
/*
#include "config.h"
+#include "gtkscalebutton.h"
+
#ifndef _WIN32
#define _GNU_SOURCE
#endif
#include <stdlib.h>
#include <string.h>
+#include "gtkadjustment.h"
#include "gtkbindings.h"
#include "gtkframe.h"
#include "gtkmain.h"
#include "gtkorientable.h"
#include "gtkprivate.h"
#include "gtkscale.h"
-#include "gtkscalebutton.h"
#include "gtkstock.h"
-#include "gtkvbox.h"
+#include "gtkbox.h"
#include "gtkwindow.h"
#include "gtktypebuiltins.h"
#include "gtkintl.h"
+#include "a11y/gtkscalebuttonaccessible.h"
/**
* SECTION:gtkscalebutton
"popup", 0);
gtk_binding_entry_add_signal (binding_set, GDK_KEY_Escape, 0,
"popdown", 0);
+
+ gtk_widget_class_set_accessible_type (widget_class, GTK_TYPE_SCALE_BUTTON_ACCESSIBLE);
}
static void
/* the scale */
priv->scale = gtk_scale_button_scale_new (button);
gtk_container_add (GTK_CONTAINER (priv->box), priv->scale);
+
+ gtk_widget_add_events (GTK_WIDGET (button), GDK_SCROLL_MASK);
}
static GObject *
GtkScaleButton *button = (GtkScaleButton *) widget;
GtkScaleButtonPrivate *priv;
GdkScreen *screen;
- GValue value = { 0, };
+ GValue value = G_VALUE_INIT;
if (gtk_widget_has_screen (widget) == FALSE)
return;
monitor = gdk_screen_get_monitor_at_point (screen,
button_event->x_root,
button_event->y_root);
- gdk_screen_get_monitor_geometry (screen, monitor, &rect);
+ gdk_screen_get_monitor_workarea (screen, monitor, &rect);
if (priv->orientation == GTK_ORIENTATION_VERTICAL)
y += button_event->y;
static gboolean gtk_scale_button_scale_release (GtkWidget *widget,
GdkEventButton *event);
+GType _gtk_scale_button_scale_get_type (void);
+
G_DEFINE_TYPE (GtkScaleButtonScale, _gtk_scale_button_scale, GTK_TYPE_SCALE)
static void