summaryrefslogtreecommitdiff
path: root/libsn/sn-monitor.h
diff options
context:
space:
mode:
authorHavoc Pennington <hp@redhat.com>2002-10-20 17:49:54 +0000
committerHavoc Pennington <hp@redhat.com>2002-10-20 17:49:54 +0000
commit58144125e0fe2b43bcb6aad75f258c8042b70feb (patch)
treed9008a50edad4eaf1a6e2e8c3deb7f899d998ba6 /libsn/sn-monitor.h
downloadstartup-notification-58144125e0fe2b43bcb6aad75f258c8042b70feb.tar.gz
initial copy of liblf with files renamed to libsn
Diffstat (limited to 'libsn/sn-monitor.h')
-rw-r--r--libsn/sn-monitor.h97
1 files changed, 97 insertions, 0 deletions
diff --git a/libsn/sn-monitor.h b/libsn/sn-monitor.h
new file mode 100644
index 0000000..e9efdd9
--- /dev/null
+++ b/libsn/sn-monitor.h
@@ -0,0 +1,97 @@
+/* Monitor API - if you are a program that monitors launch sequences */
+/*
+ * Copyright (C) 2002 Red Hat, Inc.
+ *
+ * Permission is hereby granted, free of charge, to any person
+ * obtaining a copy of this software and associated documentation
+ * files (the "Software"), to deal in the Software without
+ * restriction, including without limitation the rights to use, copy,
+ * modify, merge, publish, distribute, sublicense, and/or sell copies
+ * of the Software, and to permit persons to whom the Software is
+ * furnished to do so, subject to the following conditions:
+ *
+ * The above copyright notice and this permission notice shall be
+ * included in all copies or substantial portions of the Software.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+ * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+ * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
+ * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
+ * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
+ * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
+ * SOFTWARE.
+ */
+
+
+#ifndef __LF_MONITOR_H__
+#define __LF_MONITOR_H__
+
+#include <liblf/lf-common.h>
+
+LF_BEGIN_DECLS
+
+typedef struct LfMonitorContext LfMonitorContext;
+typedef struct LfMonitorEvent LfMonitorEvent;
+typedef struct LfLaunchSequence LfLaunchSequence;
+
+typedef void (* LfMonitorEventFunc) (LfMonitorEvent *event,
+ void *user_data);
+
+typedef enum
+{
+ LF_MONITOR_EVENT_INITIATED,
+ LF_MONITOR_EVENT_COMPLETED,
+ LF_MONITOR_EVENT_CANCELED,
+ LF_MONITOR_EVENT_PULSE,
+ LF_MONITOR_EVENT_GEOMETRY_CHANGED,
+ LF_MONITOR_EVENT_PID_CHANGED,
+ /* only allowed with xmessages protocol */
+ LF_MONITOR_EVENT_WORKSPACE_CHANGED
+} LfMonitorEventType;
+
+LfMonitorContext* lf_monitor_context_new (LfDisplay *display,
+ LfMonitorEventFunc event_func,
+ void *event_func_data,
+ LfFreeFunc free_data_func);
+void lf_monitor_context_ref (LfMonitorContext *context);
+void lf_monitor_context_unref (LfMonitorContext *context);
+
+
+void lf_monitor_event_ref (LfMonitorEvent *event);
+void lf_monitor_event_unref (LfMonitorEvent *event);
+LfMonitorEvent* lf_monitor_event_copy (LfMonitorEvent *event);
+LfMonitorEventType lf_monitor_event_get_type (LfMonitorEvent *event);
+LfLaunchSequence* lf_monitor_event_get_launch_sequence (LfMonitorEvent *event);
+LfMonitorContext* lf_monitor_event_get_context (LfMonitorEvent *event);
+Time lf_monitor_event_get_time (LfMonitorEvent *event);
+
+void lf_launch_sequence_ref (LfLaunchSequence *sequence);
+void lf_launch_sequence_unref (LfLaunchSequence *sequence);
+const char* lf_launch_sequence_get_id (LfLaunchSequence *sequence);
+Window lf_launch_sequence_get_window (LfLaunchSequence *sequence);
+lf_bool_t lf_launch_sequence_get_geometry (LfLaunchSequence *sequence,
+ int *x,
+ int *y,
+ int *width,
+ int *height);
+Window lf_launch_sequence_get_geometry_window (LfLaunchSequence *sequence);
+lf_bool_t lf_launch_sequence_get_completed (LfLaunchSequence *sequence);
+lf_bool_t lf_launch_sequence_get_canceled (LfLaunchSequence *sequence);
+const char* lf_launch_sequence_get_name (LfLaunchSequence *sequence);
+const char* lf_launch_sequence_get_description (LfLaunchSequence *sequence);
+int lf_launch_sequence_get_workspace (LfLaunchSequence *sequence);
+const char* lf_launch_sequence_get_legacy_resource_class (LfLaunchSequence *sequence);
+const char* lf_launch_sequence_get_legacy_resource_name (LfLaunchSequence *sequence);
+const char* lf_launch_sequence_get_legacy_window_title (LfLaunchSequence *sequence);
+lf_bool_t lf_launch_sequence_get_supports_cancel (LfLaunchSequence *sequence);
+int lf_launch_sequence_get_pid (LfLaunchSequence *sequence);
+const char* lf_launch_sequence_get_binary_name (LfLaunchSequence *sequence);
+const char* lf_launch_sequence_get_hostname (LfLaunchSequence *sequence);
+const char* lf_launch_sequence_get_icon_name (LfLaunchSequence *sequence);
+
+void lf_launch_sequence_cancel (LfLaunchSequence *sequence);
+
+LF_END_DECLS
+
+#endif /* __LF_MONITOR_H__ */