![]() |
![]() |
![]() |
Mx Toolkit Reference Manual | ![]() |
---|---|---|---|---|
Top | Description | Object Hierarchy | Properties | Signals |
struct MxApplication; enum MxApplicationFlags; MxApplication * mx_application_new (gint *argc
,gchar ***argv
,const gchar *name
,MxApplicationFlags flags
); void mx_application_run (MxApplication *application
); void mx_application_quit (MxApplication *application
); MxWindow * mx_application_create_window (MxApplication *application
); MxApplicationFlags mx_application_get_flags (MxApplication *application
); void mx_application_add_window (MxApplication *application
,MxWindow *window
); void mx_application_remove_window (MxApplication *application
,MxWindow *window
); const GList * mx_application_get_windows (MxApplication *application
); void mx_application_add_action (MxApplication *application
,MxAction *action
); void mx_application_remove_action (MxApplication *application
,const gchar *name
); GList * mx_application_get_actions (MxApplication *application
); void mx_application_invoke_action (MxApplication *application
,const gchar *name
); gboolean mx_application_is_running (MxApplication *application
);
"application-name" gchar* : Read / Write / Construct Only "flags" guint : Read / Write / Construct Only
struct MxApplication;
The contents of this structure are private and should only be accessed through the public API.
typedef enum { MX_APPLICATION_SINGLE_INSTANCE = 1, MX_APPLICATION_KEEP_ALIVE = 1 << 2, } MxApplicationFlags;
MxApplication * mx_application_new (gint *argc
,gchar ***argv
,const gchar *name
,MxApplicationFlags flags
);
Intialises everything needed to operate Clutter and use MxApplication.
See clutter_init()
.
|
The number of arguments in argv. [inout] |
|
A pointer to an array of arguments. [array length=argc][inout][allow-none] |
|
Unique application name. |
|
Application flags. |
Returns : |
the MxApplication singleton. |
void mx_application_run (MxApplication *application
);
Run the main loop of the application and start processing events. This function will not return until the application is quit. If the application is single instance and an existing instance is already running, this will cause the existing instance to be raised and the function will complete immediately.
|
an MxApplication |
void mx_application_quit (MxApplication *application
);
Stop the application from running and quit the main loop. This will cause
the call to mx_application_run()
to complete.
|
an MxApplication |
MxWindow * mx_application_create_window (MxApplication *application
);
Creates a window and associates it with the application.
|
The MxApplication |
Returns : |
An MxWindow. [transfer none] |
MxApplicationFlags mx_application_get_flags (MxApplication *application
);
Get the application flags that where set on application
when created.
|
an MxApplication |
Returns : |
the application flags |
void mx_application_add_window (MxApplication *application
,MxWindow *window
);
Adds a window to the list of windows associated with application
. If this
is the first window, it will be treated as the primary window and used for
startup notification.
This function does not take a reference on window
.
|
The MxApplication |
|
The MxWindow to add to the application. [transfer full] |
void mx_application_remove_window (MxApplication *application
,MxWindow *window
);
Remove the specified window from the application. This will cause the window to be unreferenced and destroyed unless another reference is held on it.
|
an MxApplication |
|
an MxWindow |
const GList * mx_application_get_windows (MxApplication *application
);
Retrieves all windows added to application
.
|
an MxApplication |
Returns : |
a list
of MxWindows. The returned list is owned by
application and must not be altered. [element-type MxWindow][transfer none]
|
void mx_application_add_action (MxApplication *application
,MxAction *action
);
Add an action to the application.
|
an MxApplication |
|
an MxAction |
void mx_application_remove_action (MxApplication *application
,const gchar *name
);
Remove the action with the specified name from the application.
|
an MxApplication |
|
name of the action to remove |
GList * mx_application_get_actions (MxApplication *application
);
Retrieves all actions registered on application
.
|
an MxApplication |
Returns : |
a list
of MxActions. Use g_list_free() on the returned list
when done. [element-type Action][transfer container]
|
void mx_application_invoke_action (MxApplication *application
,const gchar *name
);
Run the named action for the application.
|
an MxApplication |
|
name of the action to invoke |
gboolean mx_application_is_running (MxApplication *application
);
Query whether MxApplication is running. This will also return TRUE if the given MxApplication is single instance and there is an instance already running.
|
an MxApplication |
Returns : |
TRUE if the application is running |
"application-name"
property"application-name" gchar* : Read / Write / Construct Only
Name of the application.
Default value: ""
"flags"
property"flags" guint : Read / Write / Construct Only
Application Flags.
Allowed values: <= G_MAXLONG
Default value: 0
"actions-changed"
signalvoid user_function (MxApplication *arg0,
gpointer user_data) : Run Last
Emitted when an action has been added or removed from the MxApplication.
|
user data set when the signal handler was connected. |