File: GtkRadioMenuItem.xs

package info (click to toggle)
libgtk-perl 0.1.17-1
  • links: PTS
  • area: main
  • in suites: hamm
  • size: 1,352 kB
  • ctags: 1,100
  • sloc: ansic: 4,393; perl: 3,463; makefile: 36
file content (56 lines) | stat: -rw-r--r-- 1,110 bytes parent folder | download | duplicates (2)
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

#include "EXTERN.h"
#include "perl.h"
#include "XSUB.h"

#include <gtk/gtk.h>

#include "GtkTypes.h"
#include "GdkTypes.h"
#include "MiscTypes.h"

#include "GtkDefs.h"

#ifndef boolSV
# define boolSV(b) ((b) ? &sv_yes : &sv_no)
#endif


MODULE = Gtk::RadioMenuItem		PACKAGE = Gtk::RadioMenuItem		PREFIX = gtk_menu_item_

#ifdef GTK_RADIO_MENU_ITEM

Gtk::RadioMenuItem_Sink
new(Class, label=0, previous=0)
	SV *	Class
	SV *	label
	Gtk::RadioMenuItem_OrNULL	previous
	CODE:
	{
		GSList * group = 0;
		if (previous)	
			group = gtk_radio_menu_item_group(previous);
		if (label && SvOK(label))
			RETVAL = GTK_RADIO_MENU_ITEM(gtk_radio_menu_item_new_with_label(group, SvPV(label,na)));
		else
			RETVAL = GTK_RADIO_MENU_ITEM(gtk_radio_menu_item_new(group));
	}
	OUTPUT:
	RETVAL

Gtk::RadioMenuItem_Sink
new_with_label(Class, label, previous=0)
	SV *	Class
	char *	label
	Gtk::RadioMenuItem_OrNULL	previous
	CODE:
	{
		GSList * group = 0;
		if (previous)	
			group = gtk_radio_menu_item_group(previous);
		RETVAL = GTK_RADIO_MENU_ITEM(gtk_radio_menu_item_new_with_label(group, label));
	}
	OUTPUT:
	RETVAL

#endif