aboutsummaryrefslogtreecommitdiff
path: root/libdino/src/plugin
diff options
context:
space:
mode:
authorMarvin W <git@larma.de>2017-05-04 22:05:48 +0200
committerMarvin W <git@larma.de>2017-08-17 19:53:34 +0200
commit5dc460fc1a72a3dfe83453f4c6683be20a1a2a2d (patch)
tree764b4770607e0a2997a69a5651c81e90ca3d4e99 /libdino/src/plugin
parentf78818abbee52dc187812428d3eb6542853611a0 (diff)
downloaddino-5dc460fc1a72a3dfe83453f4c6683be20a1a2a2d.tar.gz
dino-5dc460fc1a72a3dfe83453f4c6683be20a1a2a2d.zip
libdino: remove dependency to GTK+ (all GTK+ code is in main+plugins)
Diffstat (limited to 'libdino/src/plugin')
-rw-r--r--libdino/src/plugin/interfaces.vala28
1 files changed, 18 insertions, 10 deletions
diff --git a/libdino/src/plugin/interfaces.vala b/libdino/src/plugin/interfaces.vala
index dbed6a00..729f7b26 100644
--- a/libdino/src/plugin/interfaces.vala
+++ b/libdino/src/plugin/interfaces.vala
@@ -1,5 +1,3 @@
-using Gtk;
-
using Dino.Entities;
namespace Dino.Plugins {
@@ -12,6 +10,10 @@ public enum Priority {
HIGHEST
}
+public enum WidgetType {
+ GTK
+}
+
public interface RootInterface : Object {
public abstract void registered(Dino.Application app);
@@ -31,10 +33,10 @@ public abstract class AccountSettingsEntry : Object {
public abstract string name { get; }
public virtual int16 label_top_padding { get { return -1; } }
- public abstract AccountSettingsWidget get_widget();
+ public abstract AccountSettingsWidget? get_widget(WidgetType type);
}
-public interface AccountSettingsWidget : Gtk.Widget {
+public interface AccountSettingsWidget : Object {
public abstract void set_account(Account account);
public abstract signal void activated();
@@ -42,24 +44,30 @@ public interface AccountSettingsWidget : Gtk.Widget {
public abstract void deactivate();
}
-public abstract class ContactDetailsProvider : Object {
+public interface ContactDetailsProvider : Object {
public abstract string id { get; }
- public abstract void populate(Conversation conversation, ContactDetails contact_details);
+ public abstract void populate(Conversation conversation, ContactDetails contact_details, WidgetType type);
}
public class ContactDetails : Object {
public signal void save();
- public signal void add(string category, string label, string? desc, Widget widget);
+ public signal void add(string category, string label, string? desc, Object widget);
+}
+
+public interface TextCommand : Object {
+ public abstract string cmd { get; }
+
+ public abstract string? handle_command(string? text, Entities.Conversation? conversation);
}
-public abstract class ConversationTitlebarEntry : Object {
+public interface ConversationTitlebarEntry : Object {
public abstract string id { get; }
public abstract double order { get; }
- public abstract ConversationTitlebarWidget get_widget();
+ public abstract ConversationTitlebarWidget get_widget(WidgetType type);
}
-public interface ConversationTitlebarWidget : Gtk.Widget {
+public interface ConversationTitlebarWidget : Object {
public abstract void set_conversation(Conversation conversation);
}