another silly example. this is just a menu items to switch desktops

SVN revision: 5282
This commit is contained in:
boris 2001-08-25 20:47:26 +00:00 committed by boris
parent 9368e00c9c
commit 0b8cc67996
3 changed files with 24 additions and 2 deletions

View File

@ -99,6 +99,7 @@ entry both 'XMag' '/usr/share/pixmaps/gnome-applets.png' 'xmag'
entry separator
entry text 'Network' 'sub' 1
entry text 'System' 'sub' 2
entry text 'Desktop' 'sub' 3
entry script 'Exit' 'e.shutdown();'
end_menu
@ -112,5 +113,11 @@ entry text 'Shut Down' 'sudo -S /sbin/shutdown -h now'
entry text 'Reboot' 'sudo -S /sbin/shutdown -r now'
end_menu
menu 3
entry script 'Goto Desktop 1' 'e.flipToDesktop(1);'
entry script 'Goto Desktop 2' 'e.flipToDesktop(2);'
entry script 'Goto Desktop 3' 'e.flipToDesktop(3);'
entry script 'Goto Desktop 4' 'e.flipToDesktop(4);'
end_menu
finish

View File

@ -1,6 +1,7 @@
%{
#include "Ecore.h"
#include "desktops.h"
%}
@ -40,8 +41,22 @@ class Window {
namespace e {
function flipToDesktop( number desk );
function getDesktopCount();
function flipToDesktop( number desk )
%{
e_desktops_goto( (long)desk );
%}
function getCurrentDesktop()
%{
int retval = e_desktops_get_current();
FE_RETURN_INT( retval );
%}
function getDesktopCount()
%{
int retval = e_desktops_get_num();
FE_RETURN_INT( retval );
%}
function getWidth();
function getHeight();