MxApplication

MxApplication

Functions

Properties

gchar * application-name Read / Write / Construct Only
guint flags Read / Write / Construct Only

Signals

void actions-changed Run Last

Types and Values

Object Hierarchy

    GObject
    ╰── MxApplication

Description

Functions

mx_application_new ()

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().

Parameters

argc

The number of arguments in argv.

[inout]

argv

A pointer to an array of arguments.

[array length=argc][inout][allow-none]

name

Unique application name.

 

flags

Application flags.

 

Returns

the MxApplication singleton.


mx_application_run ()

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.

Parameters

application

an MxApplication

 

mx_application_quit ()

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.

Parameters

application

an MxApplication

 

mx_application_create_window ()

MxWindow *
mx_application_create_window (MxApplication *application);

Creates a window and associates it with the application.

Parameters

application

The MxApplication

 

Returns

An MxWindow.

[transfer none]


mx_application_get_flags ()

MxApplicationFlags
mx_application_get_flags (MxApplication *application);

Get the application flags that where set on application when created.

Parameters

application

an MxApplication

 

Returns

the application flags


mx_application_add_window ()

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 .

Parameters

application

The MxApplication

 

window

The MxWindow to add to the application.

[transfer full]

mx_application_remove_window ()

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.

Parameters

application

an MxApplication

 

window

an MxWindow

 

mx_application_get_windows ()

const GList *
mx_application_get_windows (MxApplication *application);

Retrieves all windows added to application .

Parameters

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]


mx_application_add_action ()

void
mx_application_add_action (MxApplication *application,
                           MxAction *action);

Add an action to the application.

Parameters

application

an MxApplication

 

action

an MxAction

 

mx_application_remove_action ()

void
mx_application_remove_action (MxApplication *application,
                              const gchar *name);

Remove the action with the specified name from the application.

Parameters

application

an MxApplication

 

name

name of the action to remove

 

mx_application_get_actions ()

GList *
mx_application_get_actions (MxApplication *application);

Retrieves all actions registered on application .

Parameters

application

an MxApplication

 

Returns

a list of MxActions. Use g_list_free() on the returned list when done.

[element-type Mx.Action][transfer container]


mx_application_invoke_action ()

void
mx_application_invoke_action (MxApplication *application,
                              const gchar *name);

Run the named action for the application.

Parameters

application

an MxApplication

 

name

name of the action to invoke

 

mx_application_is_running ()

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.

Parameters

application

an MxApplication

 

Returns

TRUE if the application is running

Types and Values

struct MxApplication

struct MxApplication;

The contents of this structure are private and should only be accessed through the public API.


struct MxApplicationClass

struct MxApplicationClass {
  GObjectClass parent_class;

  /* vfuncs */
  MxWindow* (*create_window)   (MxApplication *application);
  void      (*raise)           (MxApplication *application);

  /* signals */
  void          (*actions_changed) (MxApplication *app);

  /* padding for future expansion */
  void (*_padding_0) (void);
  void (*_padding_1) (void);
  void (*_padding_2) (void);
  void (*_padding_3) (void);
  void (*_padding_4) (void);
};

enum MxApplicationFlags

Members

MX_APPLICATION_SINGLE_INSTANCE

   

MX_APPLICATION_KEEP_ALIVE

   

Property Details

The “application-name” property

  “application-name”         gchar *

Name of the application.

Flags: Read / Write / Construct Only

Default value: ""


The “flags” property

  “flags”                    guint

Application Flags.

Flags: Read / Write / Construct Only

Allowed values: <= G_MAXLONG

Default value: 0

Signal Details

The “actions-changed” signal

void
user_function (MxApplication *arg0,
               gpointer       user_data)

Emitted when an action has been added or removed from the MxApplication.

Parameters

user_data

user data set when the signal handler was connected.

 

Flags: Run Last