File: GtkScaleButton.xs

package info (click to toggle)
libgtk2-perl 2:1.2499-1
  • links: PTS, VCS
  • area: main
  • in suites:
  • size: 4,668 kB
  • ctags: 594
  • sloc: perl: 22,100; ansic: 122; makefile: 17
file content (65 lines) | stat: -rw-r--r-- 2,046 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
 * Copyright (c) 2007 by the gtk2-perl team (see the file AUTHORS)
 *
 * Licensed under the LGPL, see LICENSE file for more information.
 *
 * $Id$
 */

#include "gtk2perl.h"

#define ICONS_FROM_STACK(offset, icons)					\
	if (items > offset) {						\
		int i;							\
		/* icons is supposed to be NULL-terminated */		\
		icons = g_new0 (gchar *, items - offset + 1);		\
		for (i = offset; i < items; i++) {			\
			icons[i - offset] = SvPV_nolen (ST (i));	\
		}							\
	}								\

MODULE = Gtk2::ScaleButton	PACKAGE = Gtk2::ScaleButton	PREFIX = gtk_scale_button_

# GtkWidget * gtk_scale_button_new (GtkIconSize size, gdouble min, gdouble max, gdouble step, const gchar **icons);
GtkWidget *
gtk_scale_button_new (class, GtkIconSize size, gdouble min, gdouble max, gdouble step, ...)
    PREINIT:
	gchar **icons = NULL;
    CODE:
	ICONS_FROM_STACK (5, icons);
	RETVAL = gtk_scale_button_new (size, min, max, step, (const gchar **) icons);
	g_free (icons); /* NULL-safe */
    OUTPUT:
	RETVAL

# void gtk_scale_button_set_icons (GtkScaleButton *button, const gchar **icons);
void
gtk_scale_button_set_icons (GtkScaleButton *button, ...)
    PREINIT:
	gchar **icons = NULL;
    CODE:
	ICONS_FROM_STACK (1, icons);
	gtk_scale_button_set_icons (button, (const gchar **) icons);
	g_free (icons); /* NULL-safe */

gdouble gtk_scale_button_get_value (GtkScaleButton *button);

void gtk_scale_button_set_value (GtkScaleButton *button, gdouble value);

GtkAdjustment * gtk_scale_button_get_adjustment (GtkScaleButton *button);

void gtk_scale_button_set_adjustment (GtkScaleButton *button, GtkAdjustment *adjustment);

#if GTK_CHECK_VERSION (2, 14, 0)

GtkWidget * gtk_scale_button_get_popup (GtkScaleButton *button);

GtkWidget * gtk_scale_button_get_plus_button (GtkScaleButton *button);

GtkWidget * gtk_scale_button_get_minus_button (GtkScaleButton *button);

void gtk_scale_button_set_orientation (GtkScaleButton *button, GtkOrientation orientation);

GtkOrientation gtk_scale_button_get_orientation (GtkScaleButton *button);

#endif /* 2.14 */