File: GtkAction.xs

package info (click to toggle)
libgtk2-perl 2:1.2499-1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 4,668 kB
  • ctags: 594
  • sloc: perl: 22,100; ansic: 122; makefile: 17
file content (158 lines) | stat: -rw-r--r-- 4,715 bytes parent folder | download | duplicates (5)
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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
/*
 * Copyright (c) 2003-2006, 2009 by the gtk2-perl team (see the file AUTHORS)
 *
 * Licensed under the LGPL, see LICENSE file for more information.
 *
 * $Id$
 */

#include "gtk2perl.h"

MODULE = Gtk2::Action	PACKAGE = Gtk2::Action	PREFIX = gtk_action_

=for position post_interfaces

=head1 CONSTRUCTOR

=head2 action = Gtk2::Action->B<new> (key=>value,...)

Create and return a new action object.  Note that this is the C<new>
of L<Glib::Object|Glib::Object>, not C<gtk_action_new>.  Eg.

    Gtk2::Action->new (name => 'open-foo',
		       stock_id => 'gtk-open',
		       tooltip => 'Start a foo');

The keyword/value style is more flexible and a little clearer than the
four direct arguments of C<gtk_action_new> (and also works better for
subclasses).

=cut

const gchar* gtk_action_get_name (GtkAction *action);

void gtk_action_activate (GtkAction *action);

gboolean gtk_action_is_sensitive (GtkAction *action);

gboolean gtk_action_get_sensitive (GtkAction *action);

gboolean gtk_action_is_visible (GtkAction *action);

gboolean gtk_action_get_visible (GtkAction *action);

GtkWidget* gtk_action_create_icon (GtkAction *action, GtkIconSize icon_size);

GtkWidget* gtk_action_create_menu_item (GtkAction *action);

#if GTK_CHECK_VERSION (2, 12, 0)

GtkWidget* gtk_action_create_menu (GtkAction *action);

#endif

GtkWidget* gtk_action_create_tool_item (GtkAction *action);

void gtk_action_connect_proxy (GtkAction *action, GtkWidget *proxy);

void gtk_action_disconnect_proxy (GtkAction *action, GtkWidget *proxy);

void gtk_action_get_proxies (GtkAction *action);
    PREINIT:
	GSList * i;
    PPCODE:
	for (i = gtk_action_get_proxies (action) ; i != NULL ; i = i->next)
		/* We can't use newSVGtkWidget here because it always sinks the
		 * widget.  gtk_action_get_proxies might return floating
		 * widgets though, and with newSVGtkWidget we would end up
		 * owning them.  When the SV wrapper then goes out of scope,
		 * the widgets would be destroyed -- and GtkAction would hold
		 * on to dangling pointers. */
		XPUSHs (sv_2mortal (gperl_new_object (G_OBJECT (i->data), FALSE)));

void gtk_action_connect_accelerator (GtkAction *action);

void gtk_action_disconnect_accelerator (GtkAction *action);

## /* protected ... for use by child actions */
void gtk_action_block_activate_from (GtkAction *action, GtkWidget *proxy);

void gtk_action_unblock_activate_from (GtkAction *action, GtkWidget *proxy);

## /* protected ... for use by action groups */
void gtk_action_set_accel_path (GtkAction *action, const gchar *accel_path);

void gtk_action_set_accel_group (GtkAction *action, GtkAccelGroup_ornull *accel_group);

#if GTK_CHECK_VERSION (2, 6, 0)

void gtk_action_set_sensitive (GtkAction *action, gboolean sensitive);

void gtk_action_set_visible (GtkAction *action, gboolean visible);

const gchar* gtk_action_get_accel_path (GtkAction *action);

#endif

#if GTK_CHECK_VERSION (2, 16, 0)

void gtk_action_set_label (GtkAction *action, const gchar *label);

const gchar_ornull * gtk_action_get_label (GtkAction *action);

void gtk_action_set_short_label (GtkAction *action, const gchar *short_label);

const gchar_ornull * gtk_action_get_short_label (GtkAction *action);

void gtk_action_set_tooltip (GtkAction *action, const gchar_ornull *tooltip);

const gchar_ornull * gtk_action_get_tooltip (GtkAction *action);

void gtk_action_set_stock_id (GtkAction *action,const gchar_ornull *stock_id);

const gchar_ornull * gtk_action_get_stock_id (GtkAction *action);

void gtk_action_set_icon_name (GtkAction *action, const gchar_ornull *icon_name);

const gchar_ornull * gtk_action_get_icon_name (GtkAction *action);

void gtk_action_set_visible_horizontal (GtkAction *action, gboolean visible_horizontal);

gboolean gtk_action_get_visible_horizontal (GtkAction *action);

void gtk_action_set_visible_vertical (GtkAction *action, gboolean visible_vertical);

gboolean gtk_action_get_visible_vertical (GtkAction *action);

void gtk_action_set_is_important (GtkAction *action, gboolean is_important);

gboolean gtk_action_get_is_important (GtkAction *action);

# FIXME GIcon not in typemap
# void gtk_action_set_gicon (GtkAction *action, GIcon *icon);
#
# GIcon * gtk_action_get_gicon (GtkAction *action);

void gtk_action_block_activate (GtkAction *action);

void gtk_action_unblock_activate (GtkAction *action);

#endif

#if GTK_CHECK_VERSION (2, 20, 0)

gboolean gtk_action_get_always_show_image (GtkAction *action);

void gtk_action_set_always_show_image (GtkAction *action, gboolean always_show);

#endif /* 2.20 */


#if GTK_CHECK_VERSION (2, 10, 0)

MODULE = Gtk2::Action	PACKAGE = Gtk2::Widget	PREFIX = gtk_widget_

GtkAction_ornull * gtk_widget_get_action (GtkWidget *widget);

#endif