summaryrefslogtreecommitdiff
path: root/src/launcher-item.c
diff options
context:
space:
mode:
authorHannes Schulze <haschu0103@outlook.de>2025-06-19 23:17:58 +0200
committerHannes Schulze <haschu0103@outlook.de>2025-06-19 23:17:58 +0200
commit1af3d14f3f995645a0de08a54b244c19840709e9 (patch)
tree3c4098863d8a8fd004a2acc8912a23b6036ab4dd /src/launcher-item.c
parent40efcf60a5f39674b5137f11de7bcfe37fb121b5 (diff)
init hs project
Diffstat (limited to 'src/launcher-item.c')
-rw-r--r--src/launcher-item.c73
1 files changed, 0 insertions, 73 deletions
diff --git a/src/launcher-item.c b/src/launcher-item.c
deleted file mode 100644
index c4de70b..0000000
--- a/src/launcher-item.c
+++ /dev/null
@@ -1,73 +0,0 @@
-#include "launcher-item.h"
-
-static void foobar_launcher_item_default_init( FoobarLauncherItemInterface* iface );
-
-G_DEFINE_INTERFACE( FoobarLauncherItem, foobar_launcher_item, G_TYPE_OBJECT )
-
-//
-// Static initialization for the launcher item interface.
-//
-void foobar_launcher_item_default_init( FoobarLauncherItemInterface* iface )
-{
- g_object_interface_install_property( iface, g_param_spec_string(
- "title",
- "Title",
- "The title text displayed in the launcher.",
- NULL,
- G_PARAM_READABLE ) );
- g_object_interface_install_property( iface, g_param_spec_string(
- "description",
- "Description",
- "Text displayed below the title.",
- NULL,
- G_PARAM_READABLE ) );
- g_object_interface_install_property( iface, g_param_spec_object(
- "icon",
- "Icon",
- "Icon to show for the item.",
- G_TYPE_ICON,
- G_PARAM_READABLE ) );
-}
-
-//
-// Get the title text displayed in the launcher.
-//
-gchar const* foobar_launcher_item_get_title( FoobarLauncherItem* self )
-{
- g_return_val_if_fail( FOOBAR_IS_LAUNCHER_ITEM( self ), NULL );
- FoobarLauncherItemInterface* iface = FOOBAR_LAUNCHER_ITEM_GET_IFACE( self );
- g_return_val_if_fail( iface->get_title != NULL, NULL );
- return iface->get_title( self );
-}
-
-//
-// Get the text displayed below the title.
-//
-gchar const* foobar_launcher_item_get_description( FoobarLauncherItem* self )
-{
- g_return_val_if_fail( FOOBAR_IS_LAUNCHER_ITEM( self ), NULL );
- FoobarLauncherItemInterface* iface = FOOBAR_LAUNCHER_ITEM_GET_IFACE( self );
- g_return_val_if_fail( iface->get_description != NULL, NULL );
- return iface->get_description( self );
-}
-
-//
-// Get the icon to show for the item.
-//
-GIcon* foobar_launcher_item_get_icon( FoobarLauncherItem* self )
-{
- g_return_val_if_fail( FOOBAR_IS_LAUNCHER_ITEM( self ), NULL );
- FoobarLauncherItemInterface* iface = FOOBAR_LAUNCHER_ITEM_GET_IFACE( self );
- g_return_val_if_fail( iface->get_icon != NULL, NULL );
- return iface->get_icon( self );
-}
-
-//
-// Activate the item, e.g. by launching the application.
-//
-void foobar_launcher_item_activate( FoobarLauncherItem* self )
-{
- g_return_if_fail( FOOBAR_IS_LAUNCHER_ITEM( self ) );
- FoobarLauncherItemInterface* iface = FOOBAR_LAUNCHER_ITEM_GET_IFACE( self );
- if ( iface->activate ) { iface->activate( self ); }
-}