clutter-gtk 2.0.0-x86-mingw32
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +74 -0
- data/lib/clutter-gtk.rb +65 -0
- data/sample/events.rb +178 -0
- data/sample/multistage.rb +176 -0
- data/sample/redhand.png +0 -0
- data/sample/test-actor.rb +165 -0
- data/sample/test-scroll.rb +176 -0
- data/sample/test.rb +171 -0
- data/sample/window-test.rb +115 -0
- data/sample/window-test2.rb +134 -0
- data/test/clutter-gtk-test-utils.rb +21 -0
- data/test/run-test.rb +50 -0
- data/vendor/local/include/clutter-gtk-1.0/clutter-gtk/clutter-gtk.h +17 -0
- data/vendor/local/include/clutter-gtk-1.0/clutter-gtk/gtk-clutter-actor.h +87 -0
- data/vendor/local/include/clutter-gtk-1.0/clutter-gtk/gtk-clutter-embed.h +94 -0
- data/vendor/local/include/clutter-gtk-1.0/clutter-gtk/gtk-clutter-texture.h +115 -0
- data/vendor/local/include/clutter-gtk-1.0/clutter-gtk/gtk-clutter-util.h +46 -0
- data/vendor/local/include/clutter-gtk-1.0/clutter-gtk/gtk-clutter-version.h +111 -0
- data/vendor/local/include/clutter-gtk-1.0/clutter-gtk/gtk-clutter-window.h +90 -0
- data/vendor/local/lib/girepository-1.0/GtkClutter-1.0.typelib +0 -0
- data/vendor/local/lib/libclutter-gtk-1.0.a +0 -0
- data/vendor/local/lib/libclutter-gtk-1.0.la +41 -0
- data/vendor/local/lib/pkgconfig/clutter-gtk-1.0.pc +13 -0
- data/vendor/local/share/gir-1.0/GtkClutter-1.0.gir +669 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/GtkClutterActor.html +275 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/GtkClutterEmbed.html +272 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/GtkClutterWindow.html +170 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/annotation-glossary.html +58 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/ch01.html +36 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/ch02.html +42 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/ch03.html +34 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/clutter-gtk-1.0-Utility-Functions.html +257 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/clutter-gtk-1.0.devhelp2 +50 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/cluttergtk-glossary.html +35 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/cluttergtk-object-hierarchy.html +45 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/cluttergtk-object-index.html +60 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/cluttergtk-objects.html +38 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/home.png +0 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/index.html +82 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/index.sgml +53 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/ix01.html +100 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/ix02.html +203 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/ix03.html +71 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/ix04.html +32 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/left.png +0 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/license.html +59 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/right.png +0 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/style.css +266 -0
- data/vendor/local/share/gtk-doc/html/clutter-gtk-1.0/up.png +0 -0
- data/vendor/local/share/license/clutter-gtk/COPYING +504 -0
- data/vendor/local/share/locale/ja/LC_MESSAGES/cluttergtk-1.0.mo +0 -0
- data/vendor/local/share/locale/pl/LC_MESSAGES/cluttergtk-1.0.mo +0 -0
- data/vendor/local/share/locale/zh_CN/LC_MESSAGES/cluttergtk-1.0.mo +0 -0
- metadata +145 -0
@@ -0,0 +1,115 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This sample code is a port of clutter-gtk/examples/gtk-clutter-window-test.c.
|
4
|
+
# It is licensed under the terms of the GNU Lesser General Public
|
5
|
+
# License, version 2.1 or (at your option) later.
|
6
|
+
#
|
7
|
+
# The original header:
|
8
|
+
# (c) 2009, Collabora Ltd.
|
9
|
+
#
|
10
|
+
# Written by Davyd Madeley <davyd.madeley@collabora.co.uk>
|
11
|
+
#
|
12
|
+
# Copyright (C) 2013 Ruby-GNOME2 Project Team
|
13
|
+
#
|
14
|
+
# This library is free software; you can redistribute it and/or
|
15
|
+
# modify it under the terms of the GNU Lesser General Public
|
16
|
+
# License as published by the Free Software Foundation; either
|
17
|
+
# version 2.1 of the License, or (at your option) any later version.
|
18
|
+
#
|
19
|
+
# This library is distributed in the hope that it will be useful,
|
20
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
22
|
+
# Lesser General Public License for more details.
|
23
|
+
#
|
24
|
+
# You should have received a copy of the GNU Lesser General Public
|
25
|
+
# License along with this library; if not, write to the Free Software
|
26
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
27
|
+
|
28
|
+
require "clutter-gtk"
|
29
|
+
require "gdk_pixbuf2"
|
30
|
+
|
31
|
+
ClutterGtk.init
|
32
|
+
|
33
|
+
window = ClutterGtk::Window.new
|
34
|
+
window.signal_connect("destroy") do
|
35
|
+
Gtk.main_quit
|
36
|
+
end
|
37
|
+
window.set_default_size(400, 300)
|
38
|
+
|
39
|
+
NAME_COLUMN = 0
|
40
|
+
PIXBUF_COLUMN = 1
|
41
|
+
store = Gtk::ListStore.new(String, Gdk::Pixbuf)
|
42
|
+
theme = Gtk::IconTheme.default
|
43
|
+
[
|
44
|
+
"devhelp",
|
45
|
+
"empathy",
|
46
|
+
"evince",
|
47
|
+
"gnome-panel",
|
48
|
+
"seahorse",
|
49
|
+
"sound-juicer",
|
50
|
+
"totem",
|
51
|
+
].each do |icon_name|
|
52
|
+
pixbuf = theme.load_icon(icon_name, 48, 0)
|
53
|
+
iter = store.append
|
54
|
+
iter[0] = icon_name
|
55
|
+
iter[1] = pixbuf
|
56
|
+
end
|
57
|
+
|
58
|
+
icon_view = Gtk::IconView.new(store)
|
59
|
+
icon_view.text_column = NAME_COLUMN
|
60
|
+
icon_view.pixbuf_column = PIXBUF_COLUMN
|
61
|
+
|
62
|
+
scrolled_window = Gtk::ScrolledWindow.new
|
63
|
+
window.add(scrolled_window)
|
64
|
+
scrolled_window.add(icon_view)
|
65
|
+
scrolled_window.show_all
|
66
|
+
|
67
|
+
# Widget 2 is a toolbar
|
68
|
+
stage = window.stage
|
69
|
+
|
70
|
+
toolbar = Gtk::Toolbar.new
|
71
|
+
[
|
72
|
+
Gtk::Stock::ADD,
|
73
|
+
Gtk::Stock::BOLD,
|
74
|
+
Gtk::Stock::ITALIC,
|
75
|
+
Gtk::Stock::CANCEL,
|
76
|
+
Gtk::Stock::CDROM,
|
77
|
+
Gtk::Stock::CONVERT,
|
78
|
+
].each do |stock_id|
|
79
|
+
item = Gtk::ToolButton.new(:stock_id => stock_id)
|
80
|
+
toolbar.insert(item, -1)
|
81
|
+
end
|
82
|
+
|
83
|
+
toolbar.show_all
|
84
|
+
actor = ClutterGtk::Actor.new(toolbar)
|
85
|
+
actor.add_constraint(Clutter::BindConstraint.new(stage, :width, 0.0))
|
86
|
+
actor.signal_connect("enter-event") do |_actor, event|
|
87
|
+
_actor.save_easing_state do
|
88
|
+
_actor.easing_mode = :linear
|
89
|
+
|
90
|
+
_actor.opacity = 255
|
91
|
+
_actor.y = 0
|
92
|
+
end
|
93
|
+
|
94
|
+
Clutter::Event::STOP
|
95
|
+
end
|
96
|
+
|
97
|
+
actor.signal_connect("leave-event") do |_actor, event|
|
98
|
+
_actor.save_easing_state do
|
99
|
+
_actor.easing_mode = :linear
|
100
|
+
|
101
|
+
_actor.opacity = 128
|
102
|
+
_actor.y = _actor.height * -0.5
|
103
|
+
end
|
104
|
+
|
105
|
+
Clutter::Event::STOP
|
106
|
+
end
|
107
|
+
|
108
|
+
actor.y = actor.height * -0.5
|
109
|
+
actor.opacity = 128
|
110
|
+
actor.reactive = true
|
111
|
+
stage.add_child(actor)
|
112
|
+
|
113
|
+
window.show_all
|
114
|
+
|
115
|
+
Gtk.main
|
@@ -0,0 +1,134 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# This sample code is a port of clutter-gtk/examples/gtk-clutter-window-test2.c.
|
4
|
+
# It is licensed under the terms of the GNU Lesser General Public
|
5
|
+
# License, version 2.1 or (at your option) later.
|
6
|
+
#
|
7
|
+
# The original header:
|
8
|
+
# (c) 2009, Collabora Ltd.
|
9
|
+
#
|
10
|
+
# Written by Davyd Madeley <davyd.madeley@collabora.co.uk>
|
11
|
+
#
|
12
|
+
# Copyright (C) 2013 Ruby-GNOME2 Project Team
|
13
|
+
#
|
14
|
+
# This library is free software; you can redistribute it and/or
|
15
|
+
# modify it under the terms of the GNU Lesser General Public
|
16
|
+
# License as published by the Free Software Foundation; either
|
17
|
+
# version 2.1 of the License, or (at your option) any later version.
|
18
|
+
#
|
19
|
+
# This library is distributed in the hope that it will be useful,
|
20
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
21
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
22
|
+
# Lesser General Public License for more details.
|
23
|
+
#
|
24
|
+
# You should have received a copy of the GNU Lesser General Public
|
25
|
+
# License along with this library; if not, write to the Free Software
|
26
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
27
|
+
|
28
|
+
require "clutter-gtk"
|
29
|
+
require "gdk_pixbuf2"
|
30
|
+
|
31
|
+
ClutterGtk.init
|
32
|
+
|
33
|
+
window = ClutterGtk::Window.new
|
34
|
+
|
35
|
+
table = Gtk::Grid.new
|
36
|
+
|
37
|
+
table.hexpand = true
|
38
|
+
table.vexpand = true
|
39
|
+
|
40
|
+
add_button = lambda do |stock_id, row|
|
41
|
+
button = Gtk::Button.new(:stock_id => stock_id)
|
42
|
+
table.insert_row(row)
|
43
|
+
table.insert_column(row)
|
44
|
+
table.attach(button, row, row, 1, 1)
|
45
|
+
|
46
|
+
button.signal_connect("clicked") do |_button|
|
47
|
+
puts("button clicked: #{stock_id}")
|
48
|
+
|
49
|
+
toplevel = _button.toplevel
|
50
|
+
if toplevel.is_a?(ClutterGtk::Window)
|
51
|
+
# create a texture from the button image
|
52
|
+
texture = ClutterGtk::Texture.new
|
53
|
+
image = _button.image
|
54
|
+
size = image.icon_size
|
55
|
+
texture.set_from_stock(_button, stock_id.to_s, size)
|
56
|
+
|
57
|
+
# position the texture on top of the existing icon
|
58
|
+
stage = toplevel.stage
|
59
|
+
stage.add_actor(texture)
|
60
|
+
|
61
|
+
allocation = image.allocation
|
62
|
+
|
63
|
+
# replace the icon itself
|
64
|
+
blank = Gdk::Pixbuf.new(:colorspace => :rgb,
|
65
|
+
:has_alpha => true,
|
66
|
+
:bits_per_sample => 8,
|
67
|
+
:width => allocation.width,
|
68
|
+
:height => allocation.height)
|
69
|
+
blank.fill!(0x00000000)
|
70
|
+
image.pixbuf = blank
|
71
|
+
|
72
|
+
# animate a fall due to gravity
|
73
|
+
toplevel_allocation = toplevel.allocation
|
74
|
+
texture.save_easing_state do
|
75
|
+
texture.easing_mode = :ease_in_quad
|
76
|
+
texture.easing_duration = 200
|
77
|
+
texture.set_final_state("x", allocation.x.to_f)
|
78
|
+
texture.set_final_state("y", allocation.y.to_f)
|
79
|
+
texture.y = toplevel_allocation.height.to_f
|
80
|
+
end
|
81
|
+
|
82
|
+
first_completed_id = texture.signal_connect_after("transitions-completed") do
|
83
|
+
image_allocation = image.allocation
|
84
|
+
|
85
|
+
# do the second animation, have the icon grow out from the middle of the
|
86
|
+
# button
|
87
|
+
texture.save_easing_state do
|
88
|
+
texture.easing_mode = :ease_out_sine
|
89
|
+
texture.easing_duration = 100
|
90
|
+
texture.set_final_state("x", image_allocation.x.to_f)
|
91
|
+
texture.set_final_state("y", image_allocation.y.to_f)
|
92
|
+
texture.set_final_state("scale-x", 0.0)
|
93
|
+
texture.set_final_state("scale-y", 0.0)
|
94
|
+
texture.scale_x = 1.0
|
95
|
+
texture.scale_y = 1.0
|
96
|
+
texture.set_final_state("scale-gravity", Clutter::Gravity::CENTER)
|
97
|
+
end
|
98
|
+
|
99
|
+
texture.signal_handler_disconnect(first_completed_id)
|
100
|
+
|
101
|
+
second_completed_id = texture.signal_connect_after("transitions-completed") do
|
102
|
+
# undo our changes
|
103
|
+
puts("set stock = #{stock_id}, size = #{size}")
|
104
|
+
image.icon_size = size
|
105
|
+
image.stock = stock_id
|
106
|
+
texture.signal_handler_disconnect(second_completed_id)
|
107
|
+
texture.destroy
|
108
|
+
end
|
109
|
+
end
|
110
|
+
end
|
111
|
+
end
|
112
|
+
end
|
113
|
+
|
114
|
+
add_button.call(Gtk::Stock::OK, 0)
|
115
|
+
add_button.call(Gtk::Stock::CANCEL, 1)
|
116
|
+
add_button.call(Gtk::Stock::CLOSE, 2)
|
117
|
+
add_button.call(Gtk::Stock::ABOUT, 3)
|
118
|
+
add_button.call(Gtk::Stock::BOLD, 4)
|
119
|
+
add_button.call(Gtk::Stock::ITALIC, 5)
|
120
|
+
|
121
|
+
window.add(table)
|
122
|
+
window.show_all
|
123
|
+
|
124
|
+
# override the gtk-button-images setting, since we kind
|
125
|
+
# of rely on this to be true to actually show the stock
|
126
|
+
# icon falling off the button
|
127
|
+
settings = window.settings
|
128
|
+
settings.gtk_button_images = true
|
129
|
+
|
130
|
+
window.signal_connect("destroy") do
|
131
|
+
Gtk.main_quit
|
132
|
+
end
|
133
|
+
|
134
|
+
Gtk.main
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Copyright (C) 2013 Ruby-GNOME2 Project Team
|
2
|
+
#
|
3
|
+
# This library is free software; you can redistribute it and/or
|
4
|
+
# modify it under the terms of the GNU Lesser General Public
|
5
|
+
# License as published by the Free Software Foundation; either
|
6
|
+
# version 2.1 of the License, or (at your option) any later version.
|
7
|
+
#
|
8
|
+
# This library is distributed in the hope that it will be useful,
|
9
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
# Lesser General Public License for more details.
|
12
|
+
#
|
13
|
+
# You should have received a copy of the GNU Lesser General Public
|
14
|
+
# License along with this library; if not, write to the Free Software
|
15
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
|
17
|
+
require "test-unit"
|
18
|
+
require "test/unit/notify"
|
19
|
+
|
20
|
+
module ClutterGtkTestUtils
|
21
|
+
end
|
data/test/run-test.rb
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
#
|
3
|
+
# Copyright (C) 2012 Ruby-GNOME2 Project Team
|
4
|
+
#
|
5
|
+
# This library is free software; you can redistribute it and/or
|
6
|
+
# modify it under the terms of the GNU Lesser General Public
|
7
|
+
# License as published by the Free Software Foundation; either
|
8
|
+
# version 2.1 of the License, or (at your option) any later version.
|
9
|
+
#
|
10
|
+
# This library is distributed in the hope that it will be useful,
|
11
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
# Lesser General Public License for more details.
|
14
|
+
#
|
15
|
+
# You should have received a copy of the GNU Lesser General Public
|
16
|
+
# License along with this library; if not, write to the Free Software
|
17
|
+
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
18
|
+
|
19
|
+
ruby_gnome2_base = File.join(File.dirname(__FILE__), "..", "..")
|
20
|
+
ruby_gnome2_base = File.expand_path(ruby_gnome2_base)
|
21
|
+
|
22
|
+
glib_base = File.join(ruby_gnome2_base, "glib2")
|
23
|
+
gobject_introspection_base = File.join(ruby_gnome2_base, "gobject-introspection")
|
24
|
+
clutter_base = File.join(ruby_gnome2_base, "clutter")
|
25
|
+
|
26
|
+
modules = [
|
27
|
+
[glib_base, "glib2"],
|
28
|
+
[gobject_introspection_base, "gobject-introspection"],
|
29
|
+
[clutter_base, "clutter"],
|
30
|
+
]
|
31
|
+
modules.each do |target, module_name|
|
32
|
+
if system("which make > /dev/null")
|
33
|
+
`make -C #{target.dump} > /dev/null` or exit(false)
|
34
|
+
end
|
35
|
+
$LOAD_PATH.unshift(File.join(target, "ext", module_name))
|
36
|
+
$LOAD_PATH.unshift(File.join(target, "lib"))
|
37
|
+
end
|
38
|
+
|
39
|
+
$LOAD_PATH.unshift(File.join(glib_base, "test"))
|
40
|
+
require "glib-test-init"
|
41
|
+
|
42
|
+
$LOAD_PATH.unshift(File.join(gobject_introspection_base, "test"))
|
43
|
+
require "gobject-introspection-test-utils"
|
44
|
+
|
45
|
+
$LOAD_PATH.unshift(File.join(clutter_base, "test"))
|
46
|
+
require "clutter-test-utils"
|
47
|
+
|
48
|
+
require "clutter"
|
49
|
+
|
50
|
+
exit Test::Unit::AutoRunner.run(true)
|
@@ -0,0 +1,17 @@
|
|
1
|
+
#ifndef __CLUTTER_GTK_H__
|
2
|
+
#define __CLUTTER_GTK_H__
|
3
|
+
|
4
|
+
#define __CLUTTER_GTK_H_INSIDE__
|
5
|
+
|
6
|
+
/* Please, keep the list sorted alphabetically */
|
7
|
+
|
8
|
+
#include "gtk-clutter-actor.h"
|
9
|
+
#include "gtk-clutter-embed.h"
|
10
|
+
#include "gtk-clutter-texture.h"
|
11
|
+
#include "gtk-clutter-util.h"
|
12
|
+
#include "gtk-clutter-version.h"
|
13
|
+
#include "gtk-clutter-window.h"
|
14
|
+
|
15
|
+
#undef __CLUTTER_GTK_H_INSIDE__
|
16
|
+
|
17
|
+
#endif /* __CLUTTER_GTK_H__ */
|
@@ -0,0 +1,87 @@
|
|
1
|
+
/* gtk-clutter-actor.h: Gtk widget ClutterActor
|
2
|
+
*
|
3
|
+
* Copyright (C) 2009 Red Hat, Inc
|
4
|
+
* Copyright (C) 2010 Intel Corp
|
5
|
+
*
|
6
|
+
* This library is free software; you can redistribute it and/or
|
7
|
+
* modify it under the terms of the GNU Lesser General Public
|
8
|
+
* License as published by the Free Software Foundation; either
|
9
|
+
* version 2 of the License, or (at your option) any later version.
|
10
|
+
*
|
11
|
+
* This library is distributed in the hope that it will be useful,
|
12
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
14
|
+
* Lesser General Public License for more details.
|
15
|
+
*
|
16
|
+
* You should have received a copy of the GNU Lesser General Public
|
17
|
+
* License along with this library. If not see <http://www.fsf.org/licensing>.
|
18
|
+
*
|
19
|
+
* Authors:
|
20
|
+
* Alexander Larsson <alexl@redhat.com>
|
21
|
+
* Emmanuele Bassi <ebassi@linux.intel.com>
|
22
|
+
*/
|
23
|
+
|
24
|
+
#if !defined(__CLUTTER_GTK_H_INSIDE__) && !defined(CLUTTER_GTK_COMPILATION)
|
25
|
+
#error "Only <clutter-gtk/clutter-gtk.h> can be included directly."
|
26
|
+
#endif
|
27
|
+
|
28
|
+
#ifndef __GTK_CLUTTER_ACTOR_H__
|
29
|
+
#define __GTK_CLUTTER_ACTOR_H__
|
30
|
+
|
31
|
+
#include <gtk/gtk.h>
|
32
|
+
#include <clutter/clutter.h>
|
33
|
+
|
34
|
+
G_BEGIN_DECLS
|
35
|
+
|
36
|
+
#define GTK_CLUTTER_TYPE_ACTOR (gtk_clutter_actor_get_type ())
|
37
|
+
#define GTK_CLUTTER_ACTOR(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_CLUTTER_TYPE_ACTOR, GtkClutterActor))
|
38
|
+
#define GTK_CLUTTER_IS_ACTOR(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_CLUTTER_TYPE_ACTOR))
|
39
|
+
#define GTK_CLUTTER_ACTOR_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GTK_CLUTTER_TYPE_ACTOR, GtkClutterActorClass))
|
40
|
+
#define GTK_CLUTTER_IS_ACTOR_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_CLUTTER_TYPE_ACTOR))
|
41
|
+
#define GTK_CLUTTER_ACTOR_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_CLUTTER_TYPE_ACTOR, GtkClutterActorClass))
|
42
|
+
|
43
|
+
typedef struct _GtkClutterActor GtkClutterActor;
|
44
|
+
typedef struct _GtkClutterActorPrivate GtkClutterActorPrivate;
|
45
|
+
typedef struct _GtkClutterActorClass GtkClutterActorClass;
|
46
|
+
|
47
|
+
/**
|
48
|
+
* GtkClutterActor:
|
49
|
+
*
|
50
|
+
* A ClutterActor containing a #GtkWidget.
|
51
|
+
*/
|
52
|
+
struct _GtkClutterActor
|
53
|
+
{
|
54
|
+
/*< private >*/
|
55
|
+
ClutterActor parent_instance;
|
56
|
+
|
57
|
+
GtkClutterActorPrivate *priv;
|
58
|
+
};
|
59
|
+
|
60
|
+
/**
|
61
|
+
* GtkClutterActorClass:
|
62
|
+
*
|
63
|
+
* Base class for #GtkClutterActor.
|
64
|
+
*/
|
65
|
+
struct _GtkClutterActorClass
|
66
|
+
{
|
67
|
+
/*< private >*/
|
68
|
+
ClutterActorClass parent_class;
|
69
|
+
|
70
|
+
/* padding for future expansion */
|
71
|
+
void (*_clutter_gtk_reserved1) (void);
|
72
|
+
void (*_clutter_gtk_reserved2) (void);
|
73
|
+
void (*_clutter_gtk_reserved3) (void);
|
74
|
+
void (*_clutter_gtk_reserved4) (void);
|
75
|
+
void (*_clutter_gtk_reserved5) (void);
|
76
|
+
void (*_clutter_gtk_reserved6) (void);
|
77
|
+
};
|
78
|
+
|
79
|
+
GType gtk_clutter_actor_get_type (void) G_GNUC_CONST;
|
80
|
+
ClutterActor *gtk_clutter_actor_new (void);
|
81
|
+
ClutterActor *gtk_clutter_actor_new_with_contents (GtkWidget *contents);
|
82
|
+
GtkWidget * gtk_clutter_actor_get_contents (GtkClutterActor *actor);
|
83
|
+
GtkWidget * gtk_clutter_actor_get_widget (GtkClutterActor *actor);
|
84
|
+
|
85
|
+
G_END_DECLS
|
86
|
+
|
87
|
+
#endif /* __GTK_CLUTTER_ACTOR_H__ */
|
@@ -0,0 +1,94 @@
|
|
1
|
+
/* gtk-clutter-embed.h: Embeddable ClutterStage
|
2
|
+
*
|
3
|
+
* Copyright (C) 2007 OpenedHand
|
4
|
+
*
|
5
|
+
* This library is free software; you can redistribute it and/or
|
6
|
+
* modify it under the terms of the GNU Lesser General Public
|
7
|
+
* License as published by the Free Software Foundation; either
|
8
|
+
* version 2 of the License, or (at your option) any later version.
|
9
|
+
*
|
10
|
+
* This library is distributed in the hope that it will be useful,
|
11
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
13
|
+
* Lesser General Public License for more details.
|
14
|
+
*
|
15
|
+
* You should have received a copy of the GNU Lesser General Public
|
16
|
+
* License along with this library. If not see <http://www.fsf.org/licensing>.
|
17
|
+
*
|
18
|
+
* Authors:
|
19
|
+
* Iain Holmes <iain@openedhand.com>
|
20
|
+
* Emmanuele Bassi <ebassi@openedhand.com>
|
21
|
+
*/
|
22
|
+
|
23
|
+
#if !defined(__CLUTTER_GTK_H_INSIDE__) && !defined(CLUTTER_GTK_COMPILATION)
|
24
|
+
#error "Only <clutter-gtk/clutter-gtk.h> can be included directly."
|
25
|
+
#endif
|
26
|
+
|
27
|
+
#ifndef __GTK_CLUTTER_EMBED_H__
|
28
|
+
#define __GTK_CLUTTER_EMBED_H__
|
29
|
+
|
30
|
+
#include <gtk/gtk.h>
|
31
|
+
#include <clutter/clutter.h>
|
32
|
+
|
33
|
+
G_BEGIN_DECLS
|
34
|
+
|
35
|
+
#define GTK_CLUTTER_TYPE_EMBED (gtk_clutter_embed_get_type ())
|
36
|
+
#define GTK_CLUTTER_EMBED(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GTK_CLUTTER_TYPE_EMBED, GtkClutterEmbed))
|
37
|
+
#define GTK_CLUTTER_IS_EMBED(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GTK_CLUTTER_TYPE_EMBED))
|
38
|
+
#define GTK_CLUTTER_EMBED_CLASS(k) (G_TYPE_CHECK_CLASS_CAST ((k), GTK_CLUTTER_TYPE_EMBED, GtkClutterEmbedClass))
|
39
|
+
#define GTK_CLUTTER_IS_EMBED_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), GTK_CLUTTER_TYPE_EMBED))
|
40
|
+
#define GTK_CLUTTER_EMBED_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), GTK_CLUTTER_TYPE_EMBED, GtkClutterEmbedClass))
|
41
|
+
|
42
|
+
typedef struct _GtkClutterEmbed GtkClutterEmbed;
|
43
|
+
typedef struct _GtkClutterEmbedPrivate GtkClutterEmbedPrivate;
|
44
|
+
typedef struct _GtkClutterEmbedClass GtkClutterEmbedClass;
|
45
|
+
|
46
|
+
/**
|
47
|
+
* GtkClutterEmbed:
|
48
|
+
*
|
49
|
+
* A #GtkWidget containing the default Clutter stage.
|
50
|
+
*
|
51
|
+
* The <structname>GtkClutterEmbed</structname> structure contains only
|
52
|
+
* private data and should be accessed using the provided API.
|
53
|
+
*/
|
54
|
+
struct _GtkClutterEmbed
|
55
|
+
{
|
56
|
+
/*< private >*/
|
57
|
+
GtkContainer parent_instance;
|
58
|
+
|
59
|
+
GtkClutterEmbedPrivate *priv;
|
60
|
+
};
|
61
|
+
|
62
|
+
/**
|
63
|
+
* GtkClutterEmbedClass:
|
64
|
+
*
|
65
|
+
* Base class for #GtkClutterEmbed.
|
66
|
+
*
|
67
|
+
* The <structname>GtkClutterEmbedClass</structname> contains only private
|
68
|
+
* data.
|
69
|
+
*/
|
70
|
+
struct _GtkClutterEmbedClass
|
71
|
+
{
|
72
|
+
/*< private >*/
|
73
|
+
GtkContainerClass parent_class;
|
74
|
+
|
75
|
+
/* padding for future expansion */
|
76
|
+
void (*_clutter_gtk_reserved1) (void);
|
77
|
+
void (*_clutter_gtk_reserved2) (void);
|
78
|
+
void (*_clutter_gtk_reserved3) (void);
|
79
|
+
void (*_clutter_gtk_reserved4) (void);
|
80
|
+
void (*_clutter_gtk_reserved5) (void);
|
81
|
+
void (*_clutter_gtk_reserved6) (void);
|
82
|
+
};
|
83
|
+
|
84
|
+
GType gtk_clutter_embed_get_type (void) G_GNUC_CONST;
|
85
|
+
|
86
|
+
GtkWidget * gtk_clutter_embed_new (void);
|
87
|
+
ClutterActor *gtk_clutter_embed_get_stage (GtkClutterEmbed *embed);
|
88
|
+
void gtk_clutter_embed_set_use_layout_size (GtkClutterEmbed *embed,
|
89
|
+
gboolean use_layout_size);
|
90
|
+
gboolean gtk_clutter_embed_get_use_layout_size (GtkClutterEmbed *embed);
|
91
|
+
|
92
|
+
G_END_DECLS
|
93
|
+
|
94
|
+
#endif /* __GTK_CLUTTER_EMBED_H__ */
|