Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/src/sugar/_sugarext.defs
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@localhost.localdomain>2008-06-06 17:13:10 (GMT)
committer Marco Pesenti Gritti <marco@localhost.localdomain>2008-06-06 17:13:10 (GMT)
commit50f79e6323eac5866b1e9793baa21f5db98aba2d (patch)
tree4d0d4acad3c224a310f9dc1b0b235502ac2cd874 /src/sugar/_sugarext.defs
parent5ba50d0e0f7dc2342e2eabf56b73b4869c8e6a3a (diff)
First go at session management. Not asking review since
it's a bunch of ugly C code imported from gnome-session. Will clean it up a bit but I don't plan to make it too shiny :)
Diffstat (limited to 'src/sugar/_sugarext.defs')
-rw-r--r--src/sugar/_sugarext.defs141
1 files changed, 141 insertions, 0 deletions
diff --git a/src/sugar/_sugarext.defs b/src/sugar/_sugarext.defs
index 1c9812e..02b673c 100644
--- a/src/sugar/_sugarext.defs
+++ b/src/sugar/_sugarext.defs
@@ -36,6 +36,27 @@
(gtype-id "SEXY_TYPE_ICON_ENTRY")
)
+(define-object SMClientXSMP
+ (in-module "Egg")
+ (parent "EggSMClient")
+ (c-name "EggSMClientXSMP")
+ (gtype-id "EGG_TYPE_SM_CLIENT_XSMP")
+)
+
+(define-object SMClient
+ (in-module "Egg")
+ (parent "GObject")
+ (c-name "EggSMClient")
+ (gtype-id "EGG_TYPE_SM_CLIENT")
+)
+
+(define-object Session
+ (in-module "Gsm")
+ (parent "GObject")
+ (c-name "GsmSession")
+ (gtype-id "GSM_TYPE_SESSION")
+)
+
;; Enumerations and flags ...
(define-enum IconEntryPosition
@@ -194,3 +215,123 @@
(c-name "sugar_preview_get_pixbuf")
(return-type "GdkPixbuf*")
)
+
+;; From eggsmclient.h
+
+(define-function egg_sm_client_get_type
+ (c-name "egg_sm_client_get_type")
+ (return-type "GType")
+)
+
+(define-function egg_sm_client_get_option_group
+ (c-name "egg_sm_client_get_option_group")
+ (return-type "GOptionGroup*")
+)
+
+(define-method is_resumed
+ (of-object "EggSMClient")
+ (c-name "egg_sm_client_is_resumed")
+ (return-type "gboolean")
+)
+
+(define-method get_state_file
+ (of-object "EggSMClient")
+ (c-name "egg_sm_client_get_state_file")
+ (return-type "GKeyFile*")
+)
+
+(define-method set_restart_command
+ (of-object "EggSMClient")
+ (c-name "egg_sm_client_set_restart_command")
+ (return-type "none")
+ (parameters
+ '("int" "argc")
+ '("const-char**" "argv")
+ )
+)
+
+(define-method startup
+ (of-object "EggSMClient")
+ (c-name "egg_sm_client_startup")
+ (return-type "none")
+)
+
+(define-method will_quit
+ (of-object "EggSMClient")
+ (c-name "egg_sm_client_will_quit")
+ (return-type "none")
+ (parameters
+ '("gboolean" "will_quit")
+ )
+)
+
+(define-function egg_sm_client_end_session
+ (c-name "egg_sm_client_end_session")
+ (return-type "gboolean")
+ (parameters
+ '("EggSMClientEndStyle" "style")
+ '("gboolean" "request_confirmation")
+ )
+)
+
+;; From xsmp.h
+
+(define-function xsmp_init
+ (c-name "gsm_xsmp_init")
+ (return-type "char*")
+)
+
+(define-function xsmp_run
+ (c-name "gsm_xsmp_run")
+ (return-type "none")
+)
+
+(define-function xsmp_shutdown
+ (c-name "gsm_xsmp_shutdown")
+ (return-type "none")
+)
+
+;; From session.h
+
+(define-method set_name
+ (of-object "GsmSession")
+ (c-name "gsm_session_set_name")
+ (return-type "none")
+ (parameters
+ '("const-char*" "name")
+ )
+)
+
+(define-method start
+ (of-object "GsmSession")
+ (c-name "gsm_session_start")
+ (return-type "none")
+)
+
+(define-method get_phase
+ (of-object "GsmSession")
+ (c-name "gsm_session_get_phase")
+ (return-type "GsmSessionPhase")
+)
+
+(define-method initiate_shutdown
+ (of-object "GsmSession")
+ (c-name "gsm_session_initiate_shutdown")
+ (return-type "none")
+)
+
+(define-method register_client
+ (of-object "GsmSession")
+ (c-name "gsm_session_register_client")
+ (return-type "char*")
+ (parameters
+ '("GsmClient*" "client")
+ '("const-char*" "previous_id")
+ )
+)
+
+(define-function session_create_global
+ (c-name "gsm_session_create_global")
+ (return-type "GsmSession*")
+)
+