PlankFactoriesAbstractMain

PlankFactoriesAbstractMain — The main class for all dock applications. All docks should extend this class. In the constructor, the string fields should be initialized to customize the dock.

Synopsis

#define             PLANK_FACTORIES_TYPE_ABSTRACT_MAIN
gint                plank_factories_abstract_main_run   (PlankFactoriesAbstractMain *self,
                                                         gchar ***args,
                                                         int *args_length1);
void                plank_factories_abstract_main_initialize_program
                                                        (PlankFactoriesAbstractMain *self);
gboolean            plank_factories_abstract_main_parse_commandline
                                                        (PlankFactoriesAbstractMain *self,
                                                         gchar ***args,
                                                         int *args_length1);
void                plank_factories_abstract_main_set_options
                                                        (PlankFactoriesAbstractMain *self);
gboolean            plank_factories_abstract_main_initialize_libraries
                                                        (PlankFactoriesAbstractMain *self,
                                                         gchar ***args,
                                                         int *args_length1);
void                plank_factories_abstract_main_initialize_services
                                                        (PlankFactoriesAbstractMain *self);
void                plank_factories_abstract_main_create_controller
                                                        (PlankFactoriesAbstractMain *self);
gboolean            plank_factories_abstract_main_is_launcher_for_dock
                                                        (PlankFactoriesAbstractMain *self,
                                                         const gchar *launcher);
void                plank_factories_abstract_main_help  (PlankFactoriesAbstractMain *self);
void                plank_factories_abstract_main_translate
                                                        (PlankFactoriesAbstractMain *self);
void                plank_factories_abstract_main_quit  (PlankFactoriesAbstractMain *self);
void                plank_factories_abstract_main_on_item_clicked
                                                        (PlankFactoriesAbstractMain *self);
void                plank_factories_abstract_main_show_about
                                                        (PlankFactoriesAbstractMain *self);
struct              PlankFactoriesAbstractMain;
struct              PlankFactoriesAbstractMainClass;

Object Hierarchy

  GObject
   +----PlankFactoriesAbstractMain

Signals

  "initialized"                                    : Run Last

Description

Details

PLANK_FACTORIES_TYPE_ABSTRACT_MAIN

#define PLANK_FACTORIES_TYPE_ABSTRACT_MAIN (plank_factories_abstract_main_get_type ())

The type for PlankFactoriesAbstractMain.


plank_factories_abstract_main_run ()

gint                plank_factories_abstract_main_run   (PlankFactoriesAbstractMain *self,
                                                         gchar ***args,
                                                         int *args_length1);

Initializes the program, makes the dock and runs it.

self :

the PlankFactoriesAbstractMain instance

args :

 . the command-line arguments. [inout][array length=args_length1]

args_length1 :

length of the args array

Returns :

the exit status value

plank_factories_abstract_main_initialize_program ()

void                plank_factories_abstract_main_initialize_program
                                                        (PlankFactoriesAbstractMain *self);

Sets the program executable's name, traps signals and intializes logging.

self :

the PlankFactoriesAbstractMain instance

plank_factories_abstract_main_parse_commandline ()

gboolean            plank_factories_abstract_main_parse_commandline
                                                        (PlankFactoriesAbstractMain *self,
                                                         gchar ***args,
                                                         int *args_length1);

Parses the command-line for options, but does not set them.

self :

the PlankFactoriesAbstractMain instance

args :

 . the command-line arguments. [inout][array length=args_length1]

args_length1 :

length of the args array

Returns :

whether the arguments were parsed successfully

plank_factories_abstract_main_set_options ()

void                plank_factories_abstract_main_set_options
                                                        (PlankFactoriesAbstractMain *self);

Sets options based on the parsed command-line.

self :

the PlankFactoriesAbstractMain instance

plank_factories_abstract_main_initialize_libraries ()

gboolean            plank_factories_abstract_main_initialize_libraries
                                                        (PlankFactoriesAbstractMain *self,
                                                         gchar ***args,
                                                         int *args_length1);

Initializes most libraries used (GTK, GDK, etc).

self :

the PlankFactoriesAbstractMain instance

args :

 . the command-line arguments. [inout][array length=args_length1]

args_length1 :

length of the args array

Returns :

whether the libraries were intialized successfully

plank_factories_abstract_main_initialize_services ()

void                plank_factories_abstract_main_initialize_services
                                                        (PlankFactoriesAbstractMain *self);

Initializes the Plank services.

self :

the PlankFactoriesAbstractMain instance

plank_factories_abstract_main_create_controller ()

void                plank_factories_abstract_main_create_controller
                                                        (PlankFactoriesAbstractMain *self);

Creates the dock controller.

self :

the PlankFactoriesAbstractMain instance

plank_factories_abstract_main_is_launcher_for_dock ()

gboolean            plank_factories_abstract_main_is_launcher_for_dock
                                                        (PlankFactoriesAbstractMain *self,
                                                         const gchar *launcher);

Is true if the launcher given is the launcher for this dock.

self :

the PlankFactoriesAbstractMain instance

launcher :

 . the launcher to test. [in]

plank_factories_abstract_main_help ()

void                plank_factories_abstract_main_help  (PlankFactoriesAbstractMain *self);

Displays the help page.

self :

the PlankFactoriesAbstractMain instance

plank_factories_abstract_main_translate ()

void                plank_factories_abstract_main_translate
                                                        (PlankFactoriesAbstractMain *self);

Displays the translate page.

self :

the PlankFactoriesAbstractMain instance

plank_factories_abstract_main_quit ()

void                plank_factories_abstract_main_quit  (PlankFactoriesAbstractMain *self);

Quits the program.

self :

the PlankFactoriesAbstractMain instance

plank_factories_abstract_main_on_item_clicked ()

void                plank_factories_abstract_main_on_item_clicked
                                                        (PlankFactoriesAbstractMain *self);

Called when a PlankItemsPlankDockItem is clicked.

self :

the PlankFactoriesAbstractMain instance

plank_factories_abstract_main_show_about ()

void                plank_factories_abstract_main_show_about
                                                        (PlankFactoriesAbstractMain *self);

Displays the about dialog.

self :

the PlankFactoriesAbstractMain instance

struct PlankFactoriesAbstractMain

struct PlankFactoriesAbstractMain;

The main class for all dock applications. All docks should extend this class. In the constructor, the string fields should be initialized to customize the dock.


struct PlankFactoriesAbstractMainClass

struct PlankFactoriesAbstractMainClass {
	GObjectClass parent_class;
	gint (*run) (PlankFactoriesAbstractMain* self, gchar*** args, int* args_length1);
	void (*initialize_program) (PlankFactoriesAbstractMain* self);
	gboolean (*parse_commandline) (PlankFactoriesAbstractMain* self, gchar*** args, int* args_length1);
	void (*set_options) (PlankFactoriesAbstractMain* self);
	gboolean (*initialize_libraries) (PlankFactoriesAbstractMain* self, gchar*** args, int* args_length1);
	void (*initialize_services) (PlankFactoriesAbstractMain* self);
	void (*create_controller) (PlankFactoriesAbstractMain* self);
	void (*help) (PlankFactoriesAbstractMain* self);
	void (*translate) (PlankFactoriesAbstractMain* self);
	void (*quit) (PlankFactoriesAbstractMain* self);
	void (*on_item_clicked) (PlankFactoriesAbstractMain* self);
	void (*show_about) (PlankFactoriesAbstractMain* self);
};

The class structure for PLANK_FACTORIES_TYPE_ABSTRACT_MAIN. All the fields in this structure are private and should never be accessed directly.

GObjectClass parent_class;

the parent class structure

run ()

virtual method called by plank_factories_abstract_main_run()

initialize_program ()

virtual method used internally

parse_commandline ()

virtual method used internally

set_options ()

virtual method used internally

initialize_libraries ()

virtual method used internally

initialize_services ()

virtual method used internally

create_controller ()

virtual method used internally

help ()

virtual method called by plank_factories_abstract_main_help()

translate ()

virtual method called by plank_factories_abstract_main_translate()

quit ()

virtual method called by plank_factories_abstract_main_quit()

on_item_clicked ()

virtual method called by plank_factories_abstract_main_on_item_clicked()

show_about ()

virtual method called by plank_factories_abstract_main_show_about()

Signal Details

The "initialized" signal

void                user_function                      (PlankFactoriesAbstractMain *abstract_main,
                                                        gpointer                    user_data)          : Run Last

Signal fired when the program is fully initialized, before creating and showing the dock.

abstract_main :

the PlankFactoriesAbstractMain instance that received the signal

user_data :

user data set when the signal handler was connected.