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 :)
This commit is contained in:
@@ -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*")
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user