![]() |
![]() |
![]() |
Gcr Library Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
struct GcrSystemPrompter; struct GcrSystemPrompterClass; enum GcrSystemPrompterMode; GcrSystemPrompter * gcr_system_prompter_new (GcrSystemPrompterMode mode
,GType prompt_type
); void gcr_system_prompter_register (GcrSystemPrompter *self
,GDBusConnection *connection
); void gcr_system_prompter_unregister (GcrSystemPrompter *self
,gboolean wait
); GcrSystemPrompterMode gcr_system_prompter_get_mode (GcrSystemPrompter *self
); GType gcr_system_prompter_get_prompt_type (GcrSystemPrompter *self
); gboolean gcr_system_prompter_get_prompting (GcrSystemPrompter *self
);
"mode" GcrSystemPrompterMode : Read / Write / Construct Only "prompt-type" GType* : Read / Write / Construct Only "prompting" gboolean : Read
This is a DBus service which is rarely implemented. Use GcrSystemPrompt to display system prompts.
The GcrSystemPrompter service responds to dbus requests to create system prompts and creates GcrPrompt type objects to display those prompts.
Pass the GType of the implementation of GcrPrompt to gcr_system_prompter_new()
.
struct GcrSystemPrompter;
A prompter used by implementations of system prompts.
struct GcrSystemPrompterClass { GObjectClass parent_class; /* signals */ GcrPrompt * (* new_prompt) (GcrSystemPrompter *self); };
The class for GcrSystemPrompter.
GObjectClass |
parent class |
default handler for the "new-prompt" signal |
typedef enum { GCR_SYSTEM_PROMPTER_SINGLE, GCR_SYSTEM_PROMPTER_MULTIPLE } GcrSystemPrompterMode;
The mode for the system prompter. Most system prompters can only show
one prompt at a time and would use the GCR_SYSTEM_PROMPTER_SINGLE
mode.
GcrSystemPrompter * gcr_system_prompter_new (GcrSystemPrompterMode mode
,GType prompt_type
);
Create a new system prompter service. This prompter won't do anything unless you connect to its signals and show appropriate prompts.
If prompt_type
is zero, then the new-prompt signal must be handled and
return a valid prompt object implementing the GcrPrompt interface.
If prompt_type
is non-zero then the GType must implement the GcrPrompt
interface.
|
the mode for the prompt |
|
the gobject type for prompts created by this prompter |
Returns : |
a new prompter service. [transfer full] |
void gcr_system_prompter_register (GcrSystemPrompter *self
,GDBusConnection *connection
);
Register this system prompter on the DBus connection
.
This makes the prompter available for clients to call. The prompter will
remain registered until gcr_system_prompter_unregister()
is called, or the
prompter is unreferenced.
|
the system prompter |
|
a DBus connection |
void gcr_system_prompter_unregister (GcrSystemPrompter *self
,gboolean wait
);
Unregister this system prompter on the DBus connection
.
The prompter must have previously been registered with gcr_system_prompter_register()
.
If wait
is set then this function will wait until all prompts have been closed
or cancelled. This is usually only used by tests.
|
the system prompter |
|
whether to wait for closing prompts |
GcrSystemPrompterMode gcr_system_prompter_get_mode (GcrSystemPrompter *self
);
Get the mode for this prompter.
Most system prompters only display one prompt at a time and therefore
return GCR_SYSTEM_PROMPTER_SINGLE
.
|
the prompter |
Returns : |
the prompter mode |
GType gcr_system_prompter_get_prompt_type (GcrSystemPrompter *self
);
Get the GType for prompts created by this prompter.
The returned GType will be a GcrPrompt implementation.
|
the prompter |
Returns : |
the prompt GType |
gboolean gcr_system_prompter_get_prompting (GcrSystemPrompter *self
);
Get whether prompting or not.
|
the prompter |
Returns : |
whether prompting or not |
"mode"
property"mode" GcrSystemPrompterMode : Read / Write / Construct Only
The mode for this prompter.
Most system prompters only display one prompt at a time and therefore
return GCR_SYSTEM_PROMPTER_SINGLE
.
Default value: GCR_SYSTEM_PROMPTER_SINGLE
"prompt-type"
property"prompt-type" GType* : Read / Write / Construct Only
The GType for prompts created by this prompter. This must be a GcrPrompt implementation.
Allowed values: GcrPrompt
"prompting"
property"prompting" gboolean : Read
Whether the prompter is prompting or not.
Default value: FALSE
"new-prompt"
signalGcrPrompt* user_function (GcrSystemPrompter *Returns,
gpointer user_data) : Run Last
Signal emitted to create a new prompt when needed.
The default implementation of this signal creates a prompt of the type
gcr_system_prompter_get_prompt_type()
.
|
user data set when the signal handler was connected. |
Returns : |
the new prompt. [transfer full] |