From 14c3d44be469505cf8f3801fd5f63e04b6119c5f Mon Sep 17 00:00:00 2001 From: Artur Skawina Date: Sat, 4 Feb 2012 04:46:10 +0100 Subject: [PATCH] Mx support. --- gtk2/mx2.d | 6478 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ gtk2/pango.d | 1 - 2 files changed, 6478 insertions(+), 1 deletion(-) create mode 100644 gtk2/mx2.d diff --git a/gtk2/mx2.d b/gtk2/mx2.d new file mode 100644 index 0000000..ae01e67 --- /dev/null +++ b/gtk2/mx2.d @@ -0,0 +1,6478 @@ +// *** DO NOT EDIT *** +// Automatically generated from "/usr/share/gir-1.0/Mx-2.0.gir" + +module Mx2; +public import gtk2.atk; +alias gtk2.atk Atk; +public import gtk2.clutter; +alias gtk2.clutter Clutter; +public import gtk2.cogl; +alias gtk2.cogl Cogl; +public import gtk2.coglpango; +alias gtk2.coglpango CoglPango; +public import gtk2.gl; +alias gtk2.gl GL; +public import gtk2.glib2; +alias gtk2.glib2 GLib2; +public import gtk2.gobject2; +alias gtk2.gobject2 GObject2; +public import gtk2.gio2; +alias gtk2.gio2 Gio2; +public import gtk2.json; +alias gtk2.json Json; +public import gtk2.pango; +alias gtk2.pango Pango; +public import gtk2.pangocairo; +alias gtk2.pangocairo PangoCairo; +public import gtk2.pangoft2; +alias gtk2.pangoft2 PangoFT2; +public import gtk2.cairo; +alias gtk2.cairo cairo; +public import gtk2.fontconfig2; +alias gtk2.fontconfig2 fontconfig2; +public import gtk2.freetype2; +alias gtk2.freetype2 freetype2; + +// package: "mx-2.0"; +// C header: "mx/mx.h"; + +// c:symbol-prefixes: ["mx"] +// c:identifier-prefixes: ["Mx"] + +// module Mx2; + +// --- mixin/Mx2__MODULE_HEAD.d ---> + +// Missing type: + +alias void* MxSettingsProperty; + +// <--- mixin/Mx2__MODULE_HEAD.d --- + + +// The contents of this structure are private and should only be accessed +// through the public API. +struct Action /* : GObject.InitiallyUnowned */ { + mixin Gio2.Action.__interface__; + alias parent this; + alias parent super_; + alias parent initiallyunowned; + GObject2.InitiallyUnowned parent; + private ActionPrivate* priv; + + + // Creates a new, blank, #MxAction + // RETURNS: a newly allocated #MxAction + static Action* /*new*/ new_()() { + return mx_action_new(); + } + + // Creates a new #MxAction with the name and callback set + // RETURNS: a newly allocated #MxAction + // : name of the action + // : name of the action to display to the user + // : callback to connect to the activated signal + // : user data to be passed to the callback + static Action* /*new*/ new_full()(char* name, char* display_name, ActionCallbackFunc activated_cb, void* user_data) { + return mx_action_new_full(name, display_name, activated_cb, user_data); + } + + // VERSION: 1.4 + // Creates a new stateful action. + // + // @state is the initial state of the action. All future state values + // must have the same #GVariantType as the initial state. + // RETURNS: a new #MxAction + // : the name of the action + // : the type of the parameter to the activate function + // : the initial state of the action + static Action* new_stateful()(char* name, GLib2.VariantType* parameter_type, GLib2.Variant* state) { + return mx_action_new_stateful(name, parameter_type, state); + } + + // VERSION: 1.4 + // Creates a new action with a parameter. + // + // The created action is stateless. See mx_action_new_stateful(). + // RETURNS: a new #MxAction + // : the name of the action + // : the type of parameter to the activate function + static Action* new_with_parameter()(char* name, GLib2.VariantType* parameter_type=null) { + return mx_action_new_with_parameter(name, parameter_type); + } + + // Get the value of the active property + // RETURNS: #TRUE if the action is active + int get_active()() { + return mx_action_get_active(&this); + } + + // Get the display name of the action + // RETURNS: display-name of the action, owned by MxAction + char* get_display_name()() { + return mx_action_get_display_name(&this); + } + + // Get the icon of the action + // RETURNS: icon of the action, owned by MxAction + char* get_icon()() { + return mx_action_get_icon(&this); + } + + // Get the name of the action + // RETURNS: name of the action, owned by MxAction + char* get_name()() { + return mx_action_get_name(&this); + } + + // Set the value of the active property + // : the value to set + void set_active()(int active) { + mx_action_set_active(&this, active); + } + + // Set the name of the action to display to the user + // : new display name to set + void set_display_name()(char* name) { + mx_action_set_display_name(&this, name); + } + + // The icon to be used in a visual representation of an action. + // : new icon to set + void set_icon()(char* name) { + mx_action_set_icon(&this, name); + } + + // Set the name of the action + // : new name to set + void set_name()(char* name) { + mx_action_set_name(&this, name); + } + + // VERSION: 1.4 + // Indicates that the action was just activated. + // + // @parameter will always be of the expected type. In the event that + // an incorrect type was given, no signal will be emitted. + // : the parameter to the activation + extern (C) alias static void function (Action* this_, GLib2.Variant* parameter=null, void* user_data=null) signal_activate; + + ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return super_.signal_connect!name(cb, data, cf); + } + + ulong signal_connect(string name:"activate", CB:signal_activate)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data!()(&this, cast(char*)"activate", + cast(GObject2.Callback)cb, data, null, cf); + } + + // DEPRECATED (v1.4) glib:signal: activated - Use MxAction::activate instead. + // Emitted when the MxAction is activated. + extern (C) alias static void function (Action* this_, void* user_data=null) signal_activated; + ulong signal_connect(string name:"activated", CB:signal_activated)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data!()(&this, cast(char*)"activated", + cast(GObject2.Callback)cb, data, null, cf); + } +} + + +// Callback function called when action is activated. +// : An #MxAction +// : user data +extern (C) alias void function (Action* action, void* user_data) ActionCallbackFunc; + +struct ActionClass { + GObject2.InitiallyUnownedClass parent_class; + extern (C) void function (Action* action) activated; + extern (C) void function () _padding_0; + extern (C) void function () _padding_1; + extern (C) void function () _padding_2; + extern (C) void function () _padding_3; + extern (C) void function () _padding_4; +} + +struct ActionPrivate { +} + +struct ActorManager /* : GObject.Object */ { + alias parent this; + alias parent super_; + alias parent object; + GObject2.Object parent; + ActorManagerPrivate* priv; + + + // VERSION: 1.2 + // Creates a new #MxActorManager, associated with the given stage. + // + // + // A reference will not be taken on the stage, and when the stage is destroyed, + // the actor manager will lose a reference. The actor manager can be kept + // alive by taking a reference, but will no longer divide up events. + // + // RETURNS: An #MxActorManager, tied to the given #ClutterStage + // : A #ClutterStage + static ActorManager* new_()(Clutter.Stage* stage) { + return mx_actor_manager_new(stage); + } + + // VERSION: 1.2 + // Get the MxActorManager associated with a stage, or creates one if this is the + // first call to the function with the given #ClutterStage. + // + // This is a convenience function that allows for easy association of one + // #MxActorManager to a #ClutterStage. + // RETURNS: An #MxActorManager + // : A #ClutterStage + static ActorManager* get_for_stage()(Clutter.Stage* stage) { + return mx_actor_manager_get_for_stage(stage); + } + + // VERSION: 1.2 + // Adds @actor to @container. The actor may not be parented immediately, + // or at all, if the operation is cancelled. + // + // On successful completion, the #MxActorManager::actor_added signal will + // be fired. + // RETURNS: The ID for this operation. + // : A #ClutterContainer + // : A #ClutterActor + c_ulong add_actor()(Clutter.Container* container, Clutter.Actor* actor) { + return mx_actor_manager_add_actor(&this, container, actor); + } + + // VERSION: 1.2 + // Cancels the given operation, if it exists. The + // #MxActorManager::operation_cancelled signal is fired whenever an operation + // is cancelled. + // : An operation ID + void cancel_operation()(c_ulong id) { + mx_actor_manager_cancel_operation(&this, id); + } + + // VERSION: 1.2 + // Cancels all operations associated with the given actor. + // : A #ClutterActor + void cancel_operations()(Clutter.Actor* actor) { + mx_actor_manager_cancel_operations(&this, actor); + } + + // Unintrospectable method: create_actor() / mx_actor_manager_create_actor() + // VERSION: 1.2 + // Creates a #ClutterActor. The actor may not be created immediately, + // or at all, if the operation is cancelled. + // + // On successful completion, the #MxActorManager::actor_created signal will + // be fired. + // RETURNS: The ID for this operation. + // : A #ClutterActor creation function + // : data to be passed to the function, or %NULL + // : callback to invoke before the operation is removed + c_ulong create_actor()(ActorManagerCreateFunc create_func, void* userdata, GLib2.DestroyNotify destroy_func) { + return mx_actor_manager_create_actor(&this, create_func, userdata, destroy_func); + } + + // VERSION: 1.2 + // Retrieves the amount of operations left in the queue. + // RETURNS: Number of operations left to perform + uint get_n_operations()() { + return mx_actor_manager_get_n_operations(&this); + } + + // VERSION: 1.2 + // Gets the #ClutterStage the actor manager is associated with. + // RETURNS: The #ClutterStage the actor is associated with. + Clutter.Stage* get_stage()() { + return mx_actor_manager_get_stage(&this); + } + + // VERSION: 1.2 + // Retrieves the current time slice being used for operations. + // RETURNS: The time-slice being used, in milliseconds + uint get_time_slice()() { + return mx_actor_manager_get_time_slice(&this); + } + + // VERSION: 1.2 + // Removes @actor from @container. + // + // On successful completion, the #MxActorManager::actor_removed signal will + // be fired. + // + // + // The actor may not be removed immediately, and thus you may want to set + // the actor's opacity to 0 before calling this function. + // + // RETURNS: The ID for this operation. + // : A #ClutterContainer + // : A #ClutterActor + c_ulong remove_actor()(Clutter.Container* container, Clutter.Actor* actor) { + return mx_actor_manager_remove_actor(&this, container, actor); + } + + // VERSION: 1.2 + // Removes the container. This is a utility function that works by first + // removing all the children of the container, then the children itself. This + // effectively spreads the load of removing a large container. All prior + // operations associated with this container will be cancelled. + // + // + // The container may not be removed immediately, and thus you may want to set + // the container's opacity to 0 before calling this function. + // + // : A #ClutterContainer + void remove_container()(Clutter.Container* container) { + mx_actor_manager_remove_container(&this, container); + } + + // VERSION: 1.2 + // Sets the amount of time the actor manager will spend performing operations, + // before yielding to allow any necessary redrawing to occur. + // + // Lower times will lead to smoother performance, but will increase the amount + // of time it takes for operations to complete. + // : A time, in milliseconds + void set_time_slice()(uint msecs) { + mx_actor_manager_set_time_slice(&this, msecs); + } + + // VERSION: 1.2 + // Emitted when an actor add operation has completed. + // : The operation ID + // : The #ClutterContainer the actor was added to + // : The added #ClutterActor + extern (C) alias static void function (ActorManager* this_, c_ulong id, Clutter.Actor* container, Clutter.Actor* actor, void* user_data=null) signal_actor_added; + + ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return super_.signal_connect!name(cb, data, cf); + } + + ulong signal_connect(string name:"actor-added", CB:signal_actor_added)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data!()(&this, cast(char*)"actor-added", + cast(GObject2.Callback)cb, data, null, cf); + } + + // VERSION: 1.2 + // Emitted when an actor creation operation has completed. + // : The operation ID + // : The created #ClutterActor + extern (C) alias static void function (ActorManager* this_, c_ulong id, Clutter.Actor* actor, void* user_data=null) signal_actor_created; + ulong signal_connect(string name:"actor-created", CB:signal_actor_created)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data!()(&this, cast(char*)"actor-created", + cast(GObject2.Callback)cb, data, null, cf); + } + + // VERSION: 1.2 + // Emitted when all queued operations involving @actor have completed. + // : The #ClutterActor to which the signal pertains + extern (C) alias static void function (ActorManager* this_, Clutter.Actor* actor, void* user_data=null) signal_actor_finished; + ulong signal_connect(string name:"actor-finished", CB:signal_actor_finished)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data!()(&this, cast(char*)"actor-finished", + cast(GObject2.Callback)cb, data, null, cf); + } + + // VERSION: 1.2 + // Emitted when an actor remove operation has completed. + // : The operation ID + // : The #ClutterContainer the actor was removed from + // : The removed #ClutterActor + extern (C) alias static void function (ActorManager* this_, c_ulong id, Clutter.Actor* container, Clutter.Actor* actor, void* user_data=null) signal_actor_removed; + ulong signal_connect(string name:"actor-removed", CB:signal_actor_removed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data!()(&this, cast(char*)"actor-removed", + cast(GObject2.Callback)cb, data, null, cf); + } + + // VERSION: 1.2 + // Emitted when an operation has been cancelled. + // : The operation id + extern (C) alias static void function (ActorManager* this_, c_ulong id, void* user_data=null) signal_operation_cancelled; + ulong signal_connect(string name:"operation-cancelled", CB:signal_operation_cancelled)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data!()(&this, cast(char*)"operation-cancelled", + cast(GObject2.Callback)cb, data, null, cf); + } + + // VERSION: 1.2 + // Emitted when an operation has completed successfully. + // : The operation id + extern (C) alias static void function (ActorManager* this_, c_ulong id, void* user_data=null) signal_operation_completed; + ulong signal_connect(string name:"operation-completed", CB:signal_operation_completed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data!()(&this, cast(char*)"operation-completed", + cast(GObject2.Callback)cb, data, null, cf); + } + + // VERSION: 1.2 + // Emitted when an operation has failed. + // : The operation id + // : A #GError describing the reason of the failure + extern (C) alias static void function (ActorManager* this_, c_ulong id, GLib2.Error* error, void* user_data=null) signal_operation_failed; + ulong signal_connect(string name:"operation-failed", CB:signal_operation_failed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data!()(&this, cast(char*)"operation-failed", + cast(GObject2.Callback)cb, data, null, cf); + } +} + +struct ActorManagerClass { + GObject2.ObjectClass parent_class; + extern (C) void function (ActorManager* manager, c_ulong id, Clutter.Actor* actor) actor_created; + extern (C) void function (ActorManager* manager, c_ulong id, Clutter.Container* container, Clutter.Actor* actor) actor_added; + extern (C) void function (ActorManager* manager, c_ulong id, Clutter.Container* container, Clutter.Actor* actor) actor_removed; + extern (C) void function (ActorManager* manager, Clutter.Actor* actor) actor_finished; + extern (C) void function (ActorManager* manager, c_ulong id) operation_completed; + extern (C) void function (ActorManager* manager, c_ulong id) operation_cancelled; + extern (C) void function (ActorManager* manager, c_ulong id, GLib2.Error* error) operation_failed; + extern (C) void function () _padding_0; + extern (C) void function () _padding_1; + extern (C) void function () _padding_2; + extern (C) void function () _padding_3; + extern (C) void function () _padding_4; +} + +// Unintrospectable callback: ActorManagerCreateFunc() / () +extern (C) alias Clutter.Actor* function (ActorManager* manager, void* userdata) ActorManagerCreateFunc; + +enum ActorManagerError { + CONTAINER_DESTROYED = 0, + ACTOR_DESTROYED = 1, + CREATION_FAILED = 2, + UNKNOWN_OPERATION = 3 +} +struct ActorManagerPrivate { +} + + +// Class for handling an interval between to values. The contents of +// the #MxAdjustment are private and should be accessed using the +// public API. +struct Adjustment /* : GObject.Object */ { + alias parent_instance this; + alias parent_instance super_; + alias parent_instance object; + GObject2.Object parent_instance; + private AdjustmentPrivate* priv; + + + // Create a new MxAdjustment + // RETURNS: a newly allocated MxAdjustment + static Adjustment* /*new*/ new_()() { + return mx_adjustment_new(); + } + + // Create a new MxAdjustment with the properties set to the values specified. + // RETURNS: a newly allocated MxAdjustment + // : A #gdouble + // : A #gdouble + // : A #gdouble + // : A #gdouble + // : A #gdouble + // : A #gdouble + static Adjustment* /*new*/ new_with_values()(double value, double lower, double upper, double step_increment, double page_increment, double page_size) { + return mx_adjustment_new_with_values(value, lower, upper, step_increment, page_increment, page_size); + } + + // VERSION: 1.2 + // Get the value of the #MxAdjustment:clamp-value property. + // RETURNS: the current value of the "clamp-value" property. + int get_clamp_value()() { + return mx_adjustment_get_clamp_value(&this); + } + + // Get the value of the #MxAdjustment:elastic property. + // RETURNS: the current value of the "elastic" property. + int get_elastic()() { + return mx_adjustment_get_elastic(&this); + } + + // Get the value of the #MxAdjustment:lower property. + // RETURNS: the current value of the "lower" property. + double get_lower()() { + return mx_adjustment_get_lower(&this); + } + + // Get the value of the MxAdjustment:page-increment property. + // RETURNS: the current value of the "page-increment" property. + double get_page_increment()() { + return mx_adjustment_get_page_increment(&this); + } + + // Get the value of the #MxAdjustment:page-size property. + // RETURNS: the current value of the "page-size" property. + double get_page_size()() { + return mx_adjustment_get_page_size(&this); + } + + // Get the value of the MxAdjustment:step-increment property. + // RETURNS: the current value of the "step-increment" property. + double get_step_increment()() { + return mx_adjustment_get_step_increment(&this); + } + + // Get the value of the #MxAdjustment:upper property. + // RETURNS: the current value of the "upper" property. + double get_upper()() { + return mx_adjustment_get_upper(&this); + } + + // Get the current value of the #MxAdjustment:value property + // RETURNS: the current value of the "value" property + double get_value()() { + return mx_adjustment_get_value(&this); + } + + // Get the various properties of MxAdjustment. + // : A #gdouble + // : A #gdouble + // : A #gdouble + // : A #gdouble + // : A #gdouble + // : A #gdouble + void get_values()(double* value, double* lower, double* upper, double* step_increment, double* page_increment, double* page_size) { + mx_adjustment_get_values(&this, value, lower, upper, step_increment, page_increment, page_size); + } + + // Interpolate #MxAdjustment:value to the new value specified by @value, using + // the mode and duration given. + // : A #gdouble + // : duration in milliseconds + // : A #ClutterAnimationMode + void interpolate()(double value, uint duration, c_ulong mode) { + mx_adjustment_interpolate(&this, value, duration, mode); + } + + // Interpolate the value of #MxAdjustment:value to a new value calculated from + // @offset. + // : A #gdouble + // : duration in milliseconds + // : A #ClutterAnimationMode + void interpolate_relative()(double offset, uint duration, c_ulong mode) { + mx_adjustment_interpolate_relative(&this, offset, duration, mode); + } + + // VERSION: 1.2 + // Set the value of the #MxAdjustment:clamp-value property. + // : a #gboolean + void set_clamp_value()(int clamp) { + mx_adjustment_set_clamp_value(&this, clamp); + } + + // Set the value of the #MxAdjustment:elastic property. + // : A #gboolean + void set_elastic()(int elastic) { + mx_adjustment_set_elastic(&this, elastic); + } + + // Set the value of the #MxAdjustment:lower property. + // : A #gdouble + void set_lower()(double lower) { + mx_adjustment_set_lower(&this, lower); + } + + // Set the value of the #MxAdjustment:page-increment property. + // : A #gdouble + void set_page_increment()(double increment) { + mx_adjustment_set_page_increment(&this, increment); + } + + // Set the #MxAdjustment:page-size property. + // : A #gdouble + void set_page_size()(double page_size) { + mx_adjustment_set_page_size(&this, page_size); + } + + // Set the value of the #MxAdjustment:step-increment property. + // : A #gdouble + void set_step_increment()(double increment) { + mx_adjustment_set_step_increment(&this, increment); + } + + // Set the value of the #MxAdjustment:upper property. + // : A #gdouble + void set_upper()(double upper) { + mx_adjustment_set_upper(&this, upper); + } + + // Set the value of the #MxAdjustment:value property. + // : A #gdouble + void set_value()(double value) { + mx_adjustment_set_value(&this, value); + } + + // Set the various properties of MxAdjustment. + // : A #gdouble + // : A #gdouble + // : A #gdouble + // : A #gdouble + // : A #gdouble + // : A #gdouble + void set_values()(double value, double lower, double upper, double step_increment, double page_increment, double page_size) { + mx_adjustment_set_values(&this, value, lower, upper, step_increment, page_increment, page_size); + } + // Emitted when any of the adjustment values have changed + extern (C) alias static void function (Adjustment* this_, void* user_data=null) signal_changed; + + ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return super_.signal_connect!name(cb, data, cf); + } + + ulong signal_connect(string name:"changed", CB:signal_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data!()(&this, cast(char*)"changed", + cast(GObject2.Callback)cb, data, null, cf); + } + // Emitted when the animation started by mx_adjustment_interpolate completes + extern (C) alias static void function (Adjustment* this_, void* user_data=null) signal_interpolation_completed; + ulong signal_connect(string name:"interpolation-completed", CB:signal_interpolation_completed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data!()(&this, cast(char*)"interpolation-completed", + cast(GObject2.Callback)cb, data, null, cf); + } +} + +// Base class for #MxAdjustment. +struct AdjustmentClass { + private GObject2.ObjectClass parent_class; + extern (C) void function (Adjustment* adjustment) changed; + extern (C) void function (Adjustment* adjustment) interpolation_completed; + extern (C) void function () _padding_0; + extern (C) void function () _padding_1; + extern (C) void function () _padding_2; + extern (C) void function () _padding_3; +} + +struct AdjustmentPrivate { +} + +// Set the alignment of the item +enum Align { + START = 0, + MIDDLE = 1, + END = 2 +} + +// The contents of this structure are private and should only be accessed +// through the public API. +struct Application /* : GObject.Object */ { + alias parent this; + alias parent super_; + alias parent object; + GObject2.Object parent; + ApplicationPrivate* priv; + + + // Intialises everything needed to operate Clutter and use #MxApplication. + // See clutter_init(). + // RETURNS: the #MxApplication singleton. + // : The number of arguments in argv. + // : A pointer to an array of arguments + // : Unique application name. + // : Application flags. + static Application* /*new*/ new_()(/*inout*/ int* argc, /*inout*/ char*** argv, char* name, ApplicationFlags flags) { + return mx_application_new(argc, argv, name, flags); + } + + // Add an action to the application. + // : an #MxAction + void add_action()(Action* action) { + mx_application_add_action(&this, action); + } + + // 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 #MxWindow to add to the application + void add_window()(Window* window) { + mx_application_add_window(&this, window); + } + + // Creates a window and associates it with the application. + // RETURNS: An #MxWindow. + Window* create_window()() { + return mx_application_create_window(&this); + } + + // Retrieves all actions registered on @application. + // + // of #MxActions. Use g_list_free() on the returned list + // when done. + // RETURNS: a list + GLib2.List* /*new container*/ get_actions()() { + return mx_application_get_actions(&this); + } + + // Get the application flags that where set on @application when created. + // RETURNS: the application flags + ApplicationFlags get_flags()() { + return mx_application_get_flags(&this); + } + + // Retrieves all windows added to @application. + // + // of #MxWindows. The returned list is owned by + // @application and must not be altered. + // RETURNS: a list + GLib2.List* get_windows()() { + return mx_application_get_windows(&this); + } + + // Run the named action for the application. + // : name of the action to invoke + void invoke_action()(char* name) { + mx_application_invoke_action(&this, name); + } + + // VERSION: 1.4 + // Run the named action for the application, passing @variant as the parameter + // for the action. + // : name of the action to invoke + // : parameter for the action + void invoke_action_with_parameter()(char* name, GLib2.Variant* variant) { + mx_application_invoke_action_with_parameter(&this, name, variant); + } + + // Query whether #MxApplication is running. This will also return #TRUE if the + // given #MxApplication is single instance and there is an instance already + // running. + // RETURNS: #TRUE if the application is running + int is_running()() { + return mx_application_is_running(&this); + } + + // Stop the application from running and quit the main loop. This will cause + // the call to mx_application_run() to complete. + void quit()() { + mx_application_quit(&this); + } + + // Remove the action with the specified name from the application. + // : name of the action to remove + void remove_action()(char* name) { + mx_application_remove_action(&this, name); + } + + // 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 #MxWindow + void remove_window()(Window* window) { + mx_application_remove_window(&this, window); + } + + // 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. + void run()() { + mx_application_run(&this); + } + // Emitted when an action has been added or removed from the MxApplication. + extern (C) alias static void function (Application* this_, void* user_data=null) signal_actions_changed; + + ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return super_.signal_connect!name(cb, data, cf); + } + + ulong signal_connect(string name:"actions-changed", CB:signal_actions_changed)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data!()(&this, cast(char*)"actions-changed", + cast(GObject2.Callback)cb, data, null, cf); + } +} + +struct ApplicationClass { + GObject2.ObjectClass parent_class; + // RETURNS: An #MxWindow. + extern (C) Window* function (Application* application) create_window; + extern (C) void function (Application* application) raise; + extern (C) void function (Application* app) actions_changed; + extern (C) void function () _padding_0; + extern (C) void function () _padding_1; + extern (C) void function () _padding_2; + extern (C) void function () _padding_3; + extern (C) void function () _padding_4; +} + +enum ApplicationFlags { + SINGLE_INSTANCE = 1, + KEEP_ALIVE = 4 +} +struct ApplicationPrivate { +} + +// The #MxBin struct contains only private data +struct Bin /* : Widget */ { + mixin Atk.ImplementorIface.__interface__; + mixin Clutter.Animatable.__interface__; + mixin Clutter.Container.__interface__; + mixin Clutter.Scriptable.__interface__; + mixin Focusable.__interface__; + mixin Stylable.__interface__; + alias parent_instance this; + alias parent_instance super_; + alias parent_instance widget; + Widget parent_instance; + private BinPrivate* priv; + + + // Allocates the child of an #MxBin using the width and height from @box. + // This function should usually only be called by subclasses of #MxBin. + // + // This function can be used to allocate the child of an #MxBin if no special + // allocation requirements are needed. It is similar to + // #mx_allocate_align_fill, except that it reads the alignment, padding and + // fill values from the #MxBin, and will call #clutter_actor_allocate on the + // child. + // : The allocation box of the parent actor. + // : #ClutterAllocationFlags, usually provided by the. clutter_actor_allocate function. + void allocate_child()(Clutter.ActorBox* box, Clutter.AllocationFlags flags) { + mx_bin_allocate_child(&this, box, flags); + } + + // Retrieves the horizontal and vertical alignment of the child + // inside a #MxBin, as set by mx_bin_set_alignment(). + // : return location for the horizontal alignment, or %NULL + // : return location for the vertical alignment, or %NULL + void get_alignment()(Align* x_align, Align* y_align) { + mx_bin_get_alignment(&this, x_align, y_align); + } + + // Retrieves a pointer to the child of @bin. + // RETURNS: a #ClutterActor, or %NULL + Clutter.Actor* get_child()() { + return mx_bin_get_child(&this); + } + + // Retrieves the horizontal and vertical fill settings + // : return location for the horizontal fill, or %NULL + // : return location for the vertical fill, or %NULL + void get_fill()(/*out*/ int* x_fill, /*out*/ int* y_fill) { + mx_bin_get_fill(&this, x_fill, y_fill); + } + + // Sets the horizontal and vertical alignment of the child + // inside a #MxBin. + // : horizontal alignment + // : vertical alignment + void set_alignment()(Align x_align, Align y_align) { + mx_bin_set_alignment(&this, x_align, y_align); + } + + // Sets @child as the child of @bin. + // + // If @bin already has a child, the previous child is removed. + // : a #ClutterActor, or %NULL + void set_child()(Clutter.Actor* child) { + mx_bin_set_child(&this, child); + } + + // Sets whether the child of @bin should fill out the horizontal + // and/or vertical allocation of the parent + // : %TRUE if the child should fill horizontally the @bin + // : %TRUE if the child should fill vertically the @bin + void set_fill()(int x_fill, int y_fill) { + mx_bin_set_fill(&this, x_fill, y_fill); + } +} + +// The #MxBinClass struct contains only private data +struct BinClass { + private WidgetClass parent_class; + extern (C) void function () _padding_0; + extern (C) void function () _padding_1; + extern (C) void function () _padding_2; + extern (C) void function () _padding_3; + extern (C) void function () _padding_4; +} + +struct BinPrivate { +} + +struct BorderImage { + char* uri; + int top, right, bottom, left; + + int equal()(BorderImage* b2) { + return mx_border_image_equal(&this, b2); + } + static void set_from_string()(GObject2.Value* value, char* str, char* filename) { + mx_border_image_set_from_string(value, str, filename); + } +} + + +// The contents of this structure are private and should only be accessed +// through the public API. +struct BoxLayout /* : Widget */ { + mixin Atk.ImplementorIface.__interface__; + mixin Clutter.Animatable.__interface__; + mixin Clutter.Container.__interface__; + mixin Clutter.Scriptable.__interface__; + mixin Focusable.__interface__; + mixin Scrollable.__interface__; + mixin Stylable.__interface__; + alias parent this; + alias parent super_; + alias parent widget; + Widget parent; + private BoxLayoutPrivate* priv; + + + // Create a new #MxBoxLayout. + // RETURNS: a newly allocated #MxBoxLayout + static BoxLayout* new_()() { + return mx_box_layout_new(); + } + static BoxLayout* new_with_orientation()(Orientation orientation) { + return mx_box_layout_new_with_orientation(orientation); + } + + // Inserts @actor at @position in @box. + // : the #ClutterActor actor to add to the box layout + // : the position where to insert the actor + void add_actor()(Clutter.Actor* actor, int position) { + mx_box_layout_add_actor(&this, actor, position); + } + + // Unintrospectable method: add_actor_with_properties() / mx_box_layout_add_actor_with_properties() + // Inserts @actor at @position in the layout @box. You can set some layout + // properties on the child at the same time. + // + // If @position is negative, or is larger than the number of actors in the + // layout, the new actor is added on to the end of the list. + // : the #ClutterActor actor to add to the box layout + // : the position where to insert the actor + // : name of the first property to set + /+ Not available -- variadic methods unsupported - use the C function directly. + alias mx_box_layout_add_actor_with_properties add_actor_with_properties; // Variadic + +/ + + // Get the value of the #MxBoxLayoutChild:expand property + // RETURNS: the current value of the "expand" property + // : A #ClutterActor + int child_get_expand()(Clutter.Actor* child) { + return mx_box_layout_child_get_expand(&this, child); + } + + // Get the value of the #MxBoxLayoutChild:x-align property + // RETURNS: the current value of the "x-align" property + // : A #ClutterActor + Align child_get_x_align()(Clutter.Actor* child) { + return mx_box_layout_child_get_x_align(&this, child); + } + + // Get the value of the #MxBoxLayoutChild:x-fill property. + // RETURNS: the current value of the "x-fill" property. + // : A #ClutterActor + int child_get_x_fill()(Clutter.Actor* child) { + return mx_box_layout_child_get_x_fill(&this, child); + } + + // Get the value of the #MxBoxLayoutChild:y-align property. + // RETURNS: the current value of the "y-align" property. + // : A #ClutterActor + Align child_get_y_align()(Clutter.Actor* child) { + return mx_box_layout_child_get_y_align(&this, child); + } + + // Get the value of the #MxBoxLayoutChild:y-fill property + // RETURNS: the current value of the "y-fill" property + // : A #ClutterActor + int child_get_y_fill()(Clutter.Actor* child) { + return mx_box_layout_child_get_y_fill(&this, child); + } + + // Set the value of the #MxBoxLayoutChild:expand property. + // : A #ClutterActor + // : A #gboolean + void child_set_expand()(Clutter.Actor* child, int expand) { + mx_box_layout_child_set_expand(&this, child, expand); + } + + // Set the value of the #MxBoxLayoutChild:x-align property. + // : A #ClutterActor + // : An #MxAlign + void child_set_x_align()(Clutter.Actor* child, Align x_align) { + mx_box_layout_child_set_x_align(&this, child, x_align); + } + + // Set the value of the #MxBoxLayoutChild:x-fill property. + // : A #ClutterActor + // : A #gboolean + void child_set_x_fill()(Clutter.Actor* child, int x_fill) { + mx_box_layout_child_set_x_fill(&this, child, x_fill); + } + + // Set the value of the #MxBoxLayoutChild:y-align property. + // : A #ClutterActor + // : An #MxAlign + void child_set_y_align()(Clutter.Actor* child, Align y_align) { + mx_box_layout_child_set_y_align(&this, child, y_align); + } + + // Set the value of the #MxBoxLayoutChild:y-fill property. + // : A #ClutterActor + // : A #gboolean + void child_set_y_fill()(Clutter.Actor* child, int y_fill) { + mx_box_layout_child_set_y_fill(&this, child, y_fill); + } + + // Get the value of the #MxBoxLayout:enable-animations property. + // RETURNS: #TRUE if animations enabled + int get_enable_animations()() { + return mx_box_layout_get_enable_animations(&this); + } + + // Get the value of the #MxBoxLayout:orientation property. + // RETURNS: the orientation of the layout + Orientation get_orientation()() { + return mx_box_layout_get_orientation(&this); + } + + // VERSION: 1.2 + // Get the value of the #MxBoxLayout:scroll-to-focused property. + // RETURNS: #TRUE if automatically scrolling to the focused actor is enabled + int get_scroll_to_focused()() { + return mx_box_layout_get_scroll_to_focused(&this); + } + + // Get the spacing between children in pixels + // RETURNS: the spacing value + uint get_spacing()() { + return mx_box_layout_get_spacing(&this); + } + + // Enable animations when certain properties change. + // : #TRUE to enable animations + void set_enable_animations()(int enable_animations) { + mx_box_layout_set_enable_animations(&this, enable_animations); + } + + // Set the orientation of the box layout. + // : orientation value for the layout + void set_orientation()(Orientation orientation) { + mx_box_layout_set_orientation(&this, orientation); + } + + // VERSION: 1.2 + // Enables or disables automatic scrolling to the focused actor. + // : #TRUE to enable automatically scrolling to the focused actor + void set_scroll_to_focused()(int scroll_to_focused) { + mx_box_layout_set_scroll_to_focused(&this, scroll_to_focused); + } + + // Set the amount of spacing between children in pixels + // : the spacing value + void set_spacing()(uint spacing) { + mx_box_layout_set_spacing(&this, spacing); + } +} + + +// The contents of this structure are private and should only be accessed +// through the public API. +struct BoxLayoutChild /* : Clutter.ChildMeta */ { + alias parent this; + alias parent super_; + alias parent childmeta; + Clutter.ChildMeta parent; + private int expand; + static import std.bitmanip; mixin(std.bitmanip.bitfields!( + uint, "x_fill", 1, + uint, "y_fill", 1, + uint, "__dummy32A", 30)); + private Align x_align, y_align; +} + +struct BoxLayoutChildClass { + Clutter.ChildMetaClass parent_class; + extern (C) void function () _padding_0; + extern (C) void function () _padding_1; + extern (C) void function () _padding_2; + extern (C) void function () _padding_3; + extern (C) void function () _padding_4; +} + +struct BoxLayoutChildPrivate { +} + +struct BoxLayoutClass { + WidgetClass parent_class; + extern (C) void function () _padding_0; + extern (C) void function () _padding_1; + extern (C) void function () _padding_2; + extern (C) void function () _padding_3; + extern (C) void function () _padding_4; +} + +struct BoxLayoutPrivate { +} + + +// The contents of this structure is private and should only be accessed using +// the provided API. +struct Button /* : Bin */ { + mixin Atk.ImplementorIface.__interface__; + mixin Clutter.Animatable.__interface__; + mixin Clutter.Container.__interface__; + mixin Clutter.Scriptable.__interface__; + mixin Focusable.__interface__; + mixin Stylable.__interface__; + alias parent_instance this; + alias parent_instance super_; + alias parent_instance bin; + Bin parent_instance; + private ButtonPrivate* priv; + + + // Create a new button + // RETURNS: a new #MxButton + static Button* new_()() { + return mx_button_new(); + } + + // Create a new #MxButton with the specified label + // RETURNS: a new #MxButton + // : text to set the label to + static Button* new_with_label()(char* text) { + return mx_button_new_with_label(text); + } + + // VERSION: 1.2 + // Retrieves the #MxAction associated with @button. + // RETURNS: A #MxAction + Action* get_action()() { + return mx_button_get_action(&this); + } + + // VERSION: 1.2 + // Get the icon-name being used on the button. + // + // no icon has been set + // RETURNS: the icon-name. This must not be freed by the application. %NULL if + char* get_icon_name()() { + return mx_button_get_icon_name(&this); + } + + // VERSION: 1.2 + // Retrieves the icon's relative position to the text. + // RETURNS: A #MxPosition + Position get_icon_position()() { + return mx_button_get_icon_position(&this); + } + + // VERSION: 1.2 + // Retrieves the icon-size being used for the displayed icon inside the button. + // RETURNS: The icon-size being used for the button icon, in pixels + uint get_icon_size()() { + return mx_button_get_icon_size(&this); + } + + // VERSION: 1.2 + // Retrieves the visibility of the icon associated with the button's action. + // RETURNS: %TRUE if the icon is visible, %FALSE otherwise + int get_icon_visible()() { + return mx_button_get_icon_visible(&this); + } + + // Get the toggle mode status of the button. + // RETURNS: #TRUE if toggle mode is set, otherwise #FALSE + int get_is_toggle()() { + return mx_button_get_is_toggle(&this); + } + + // Get the text displayed on the button + // RETURNS: the text for the button. This must not be freed by the application + char* get_label()() { + return mx_button_get_label(&this); + } + + // VERSION: 1.2 + // Retrieves the visibility of the text associated with the button's action. + // RETURNS: %TRUE if the text is visible, %FALSE otherwise + int get_label_visible()() { + return mx_button_get_label_visible(&this); + } + + // Get the state of the button that is in toggle mode. + // RETURNS: #TRUE if the button is toggled, or #FALSE if not + int get_toggled()() { + return mx_button_get_toggled(&this); + } + + // VERSION: 1.2 + // Sets @action as the action for @button. @Button will take its label and + // icon from @action. + // : A #MxAction + void set_action()(Action* action) { + mx_button_set_action(&this, action); + } + + // VERSION: 1.2 + // Sets the icon-name used to display an icon on the button. Setting %NULL + // will remove the icon name, or resort to the icon-name set in the current + // style. Setting an icon name overrides any icon set in the style. + // : icon-name to use on the button + void set_icon_name()(char* icon_name=null) { + mx_button_set_icon_name(&this, icon_name); + } + + // VERSION: 1.2 + // Sets the icon position, relative to the text on the button. + // : A #MxPosition + void set_icon_position()(Position position) { + mx_button_set_icon_position(&this, position); + } + + // VERSION: 1.2 + // Sets the icon-size to use for the icon displayed inside the button. This will + // override the icon-size set in the style. Setting a value of %0 resets to the + // size from the style. + void set_icon_size()(uint icon_size) { + mx_button_set_icon_size(&this, icon_size); + } + + // VERSION: 1.2 + // Sets the visibility of the icon associated with the button's action. + // : %TRUE if the icon should be visible + void set_icon_visible()(int visible) { + mx_button_set_icon_visible(&this, visible); + } + + // Enables or disables toggle mode for the button. In toggle mode, the active + // state will be "toggled" when the user clicks the button. + // : #TRUE or #FALSE + void set_is_toggle()(int toggle) { + mx_button_set_is_toggle(&this, toggle); + } + + // Sets the text displayed on the button + // : text to set the label to + void set_label()(char* text) { + mx_button_set_label(&this, text); + } + + // VERSION: 1.2 + // Sets the visibility of the text associated with the button's action. + // : %TRUE if the text should be visible + void set_label_visible()(int visible) { + mx_button_set_label_visible(&this, visible); + } + + // Sets the toggled state of the button. This is only really useful if the + // button has #toggle-mode mode set to #TRUE. + // : #TRUE or #FALSE + void set_toggled()(int toggled) { + mx_button_set_toggled(&this, toggled); + } + + // Emitted when the user activates the button, either with a mouse press and + // release or with the keyboard. + extern (C) alias static void function (Button* this_, void* user_data=null) signal_clicked; + + ulong signal_connect(string name, CB)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return super_.signal_connect!name(cb, data, cf); + } + + ulong signal_connect(string name:"clicked", CB:signal_clicked)(CB cb, void* data=null, ConnectFlags cf=cast(ConnectFlags)0) { + return signal_connect_data!()(&this, cast(char*)"clicked", + cast(GObject2.Callback)cb, data, null, cf); + } +} + +struct ButtonClass { + BinClass parent_class; + extern (C) void function (Button* button) clicked; + extern (C) void function () _padding_0; + extern (C) void function () _padding_1; + extern (C) void function () _padding_2; + extern (C) void function () _padding_3; + extern (C) void function () _padding_4; +} + + +// The contents of this structure are private and should only be accessed +// through the public API. +struct ButtonGroup /* : GObject.InitiallyUnowned */ { + alias parent this; + alias parent super_; + alias parent initiallyunowned; + GObject2.InitiallyUnowned parent; + ButtonGroupPrivate* priv; + + + // Create a new #MxButtonGroup. + // RETURNS: a newly allocated #MxButtonGroup. + static ButtonGroup* new_()() { + return mx_button_group_new(); + } + + // Add @button to the #MxButtonGroup. + //