/* * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2 of the License, or (at your option) version 3. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with the program; if not, see * * * Authors: * Michael Zucchi * * Copyright (C) 1999-2008 Novell, Inc. (www.novell.com) * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include "es-event.h" #include "e-shell.h" static GObjectClass *eme_parent; static ESEvent *es_event; static void eme_init (GObject *o) { /*ESEvent *eme = (ESEvent *)o; */ } static void eme_finalise (GObject *o) { ((GObjectClass *)eme_parent)->finalize (o); } static void eme_target_free (EEvent *ep, EEventTarget *t) { switch (t->type) { case ES_EVENT_TARGET_STATE: { ESEventTargetState *s = (ESEventTargetState *)t; s = s; break; } } ((EEventClass *)eme_parent)->target_free (ep, t); } static void eme_class_init (GObjectClass *klass) { klass->finalize = eme_finalise; ((EEventClass *)klass)->target_free = eme_target_free; } GType es_event_get_type (void) { static GType type = 0; if (type == 0) { static const GTypeInfo info = { sizeof (ESEventClass), NULL, NULL, (GClassInitFunc)eme_class_init, NULL, NULL, sizeof (ESEvent), 0, (GInstanceInitFunc)eme_init }; eme_parent = g_type_class_ref (e_event_get_type ()); type = g_type_register_static(e_event_get_type(), "ESEvent", &info, 0); } return type; } /** * es_event_peek: * * Get the singular instance of the shell event handler. * * Return: the shell event handler **/ ESEvent *es_event_peek (void) { if (es_event == NULL) { es_event = g_object_new (es_event_get_type (), NULL); /** @HookPoint: Shell Events Hookpoint * Id: org.gnome.evolution.shell.events * * This is the hook point which emits shell events. */ e_event_construct(&es_event->event, "org.gnome.evolution.shell.events"); } return es_event; } ESEventTargetShell * es_event_target_new (ESEvent *eme) { return e_event_target_new ( &eme->event, ES_EVENT_TARGET_SHELL, sizeof (ESEventTargetShell)); } ESEventTargetState * es_event_target_new_state (ESEvent *eme, gint state) { ESEventTargetState *t; guint32 mask = ~0; t = e_event_target_new ( &eme->event, ES_EVENT_TARGET_STATE, sizeof (*t)); t->state = state; if (state) mask &= ~ES_EVENT_STATE_ONLINE; else mask &= ~ES_EVENT_STATE_OFFLINE; t->target.mask = mask; return t; } ESEventTargetUpgrade * es_event_target_new_upgrade (ESEvent *eme, gint major, gint minor, gint revision) { ESEventTargetUpgrade *t; t = e_event_target_new ( &eme->event, ES_EVENT_TARGET_UPGRADE, sizeof (*t)); t->major = major; t->minor = minor; t->revision = revision; return t; } ESEventTargetComponent * es_event_target_new_component (ESEvent *eme, const gchar *id) { ESEventTargetComponent *t; t = e_event_target_new ( &eme->event, ES_EVENT_TARGET_COMPONENT, sizeof (*t)); t->id = id; return t; } /* ********************************************************************** */ static gpointer emeh_parent_class; #define emeh ((ESEventHook *)eph) static const EEventHookTargetMask emeh_state_masks[] = { { "online", ES_EVENT_STATE_ONLINE }, { "offline", ES_EVENT_STATE_OFFLINE }, { NULL } }; static const EEventHookTargetMap emeh_targets[] = { { "state", ES_EVENT_TARGET_STATE, emeh_state_masks }, { "upgrade", ES_EVENT_TARGET_UPGRADE, NULL }, { "shell", ES_EVENT_TARGET_SHELL, NULL }, { "component", ES_EVENT_TARGET_COMPONENT, NULL }, { NULL } }; static void emeh_finalise (GObject *o) { /*EPluginHook *eph = (EPluginHook *)o;*/ ((GObjectClass *)emeh_parent_class)->finalize (o); } static void emeh_class_init (EPluginHookClass *klass) { gint i; /** @HookClass: Shell Main Menu * @Id: org.gnome.evolution.shell.events:1.0 * @Target: ESEventTargetState * * A hook for events coming from the shell. **/ ((GObjectClass *)klass)->finalize = emeh_finalise; ((EPluginHookClass *)klass)->id = "org.gnome.evolution.shell.events:1.0"; for (i=0;emeh_targets[i].type;i++) e_event_hook_class_add_target_map ((EEventHookClass *)klass, &emeh_targets[i]); ((EEventHookClass *)klass)->event = (EEvent *)es_event_peek (); } GType es_event_hook_get_type (void) { static GType type = 0; if (!type) { static const GTypeInfo info = { sizeof (ESEventHookClass), NULL, NULL, (GClassInitFunc) emeh_class_init, NULL, NULL, sizeof (ESEventHook), 0, (GInstanceInitFunc) NULL, }; emeh_parent_class = g_type_class_ref (e_event_hook_get_type ()); type = g_type_register_static(e_event_hook_get_type(), "ESEventHook", &info, 0); } return type; } /?h=mate-1.18'>aboutsummaryrefslogtreecommitdiffstats
Commit message (Expand)AuthorAgeFilesLines
* Move chinese/pcmanfm to x11-fm/pcmanfm.vanilla2006-02-101-0/+1
* These ports depended on jx, which was removed.kris2005-11-051-1/+0
* Add py-nautilus, Python bindings for the Nautilus file manager API.marcus2005-11-051-0/+1
* Add tdfsb 0.0.9, a 3D filesystem browser.danfe2005-10-261-0/+1
* Add evidence 0.9.8, enlightened file-manager.garga2005-09-201-0/+1
* - bring xfce4 to 4.2oliver2005-01-271-1/+0
* Repocopy from x11-fm/gnome-commander -> x11-fm/gnome-commander2, written inmezz2004-06-161-0/+1
* Remove apotheke since it no longer works with Nautilus 2.6, and accordingmarcus2004-04-111-1/+0
* Remove category pkg/COMMENT files in favour of a COMMENT variable in thekris2004-04-021-0/+2
* new port of GPRename, a Perl script for renaming filestrevor2004-03-161-0/+1
* Remove the broken vide portkris2004-02-021-1/+0
* Add xplore, an Explorer-like Motif based file manager.pav2003-12-181-0/+1
* Add velocity, a file manager for GNOME 2 desktop environment.pav2003-12-111-0/+1
* Add emelfm2 0.0.3,oliver2003-12-081-0/+1
* FSViewer new portedwin2003-10-081-0/+1
* Remove this ports as part of phase II of the GNOME 1.4 desktop removal.marcus2003-08-121-1/+0
* Add xfe 0.54.2, fast MS-Explorer like filemanager for X.oliver2003-08-081-0/+1
* Add xfce4-fm-icons 3.99.2,oliver2003-07-291-0/+1
* Add xfce4-fm 3.99.2, xFce 4 file manager.oliver2003-07-291-0/+1
* Begin the de-orbit burn of the GNOME 1.4 desktop. This is phase I. Allmarcus2003-07-161-1/+0
* Add krusader, a midnight commander like Filemanager for KDEarved2003-05-181-0/+1
* As announced on 27 March 2003 in <20030328052350.GA18971@rot13.obsecurity.org>,kris2003-05-061-1/+0
* Add MIME type editor for the ROX desktop.olgeni2003-03-251-0/+1
* Retire obsolete rox-base port (no longer needed by any rox application).olgeni2003-03-251-1/+0
* Add twander, a macro-configurable file manager written in Python.marcus2003-03-031-0/+1
* obsolete due to upgrade of master port (ports/misc/mc) to version 4.6.0fjoe2003-02-101-1/+0
* Add apotheke, a CVS view for Nautilus 2.marcus2002-11-051-0/+1
* Add back jafm which was prematurely removed by will, but mark it BROKENkris2002-05-241-0/+1
* Update nautilus2 to 1.1.16 after a repo-copy from ports/x11-fm/nautilus andsobomax2002-05-211-0/+1
* Add file_menu_applet 0.4, a small GNOME panel application which creates amarcus2002-05-071-0/+1
* Add gnome-commander, a GNOME file manager that resembles Norton Commander.marcus2002-04-301-0/+1
* Say goodbye to Qt 1.x and all of its dependents. The one port I foundwill2002-04-191-1/+0
* Adding gentoo, a nice, two-pane, gtk based file manager based loosely ondougb2001-08-121-0/+1
* Add cfm 0.5, quick Perl/Tk file manager with support for regularmarkp2001-06-231-0/+1
* Add worker 2.1.0, a X11 File Manager based on Directory Opus.will2001-03-311-0/+1
* Add rox-session, a simple session manager for the ROX desktop.olgeni2001-03-131-0/+1
* Update mtoolsfm to 1.6 after repocopy from x11-fm/mfm to x11-fm/mtoolsfm.will2000-12-211-1/+1
* "ROX-Filer is a simple and easy to use graphical file manager for X11."dougb2000-11-261-0/+1
* rox-base contains basic icons and configuration items neededdougb2000-11-261-0/+1
* Add x11-fm/xdiskusage, a graphical front-end to du.trevor2000-10-041-0/+1
* Adding systemg version 1.0.1.steve2000-09-181-0/+1
* Add nautilus, the file manager and graphical shell beingade2000-09-151-0/+1
* Add vide, a simple filemanager with vi-like keybindings.will2000-06-101-0/+1
* Nuke q3dmenu. The port never had been a real aplication, but just a smallsobomax2000-06-051-1/+0