summaryrefslogtreecommitdiffstats
path: root/ksirc/puke/pmenudta.pm
diff options
context:
space:
mode:
Diffstat (limited to 'ksirc/puke/pmenudta.pm')
-rw-r--r--ksirc/puke/pmenudta.pm60
1 files changed, 60 insertions, 0 deletions
diff --git a/ksirc/puke/pmenudta.pm b/ksirc/puke/pmenudta.pm
new file mode 100644
index 00000000..f98acf91
--- /dev/null
+++ b/ksirc/puke/pmenudta.pm
@@ -0,0 +1,60 @@
+&::PukeSendMessage($PUKE_WIDGET_LOAD,
+ $PUKE_CONTROLLER,
+ $PWIDGET_MENUDATA,
+ "pmenudta.so",
+ sub { my %ARG = %{shift()};
+ if($ARG{'iArg'} == 1){
+ print "*E* PMenuData Load failed!\n";
+ }
+ }
+ );
+
+package PMenuData;
+use strict;
+
+#
+# Only methods, constructor must create $self elsewhere and must of PBase type
+#
+
+sub new {
+ print "*E* Can't call new for this class\n";
+}
+
+sub insertText {
+ my $self = shift;
+
+ my $text = shift;
+
+ my %ARG = $self->sendMessage('iCommand' => $::PUKE_MENUDATA_INSERT_TEXT,
+ 'cArg' => $text,
+ 'WaitFor' => 1);
+
+ return $ARG{'iArg'};
+}
+
+sub insertPixmap {
+ my $self = shift;
+
+ my $text = shift;
+
+ my %ARG = $self->sendMessage('iCommand' => $::PUKE_MENUDATA_INSERT_PIXMAP,
+ 'cArg' => $text,
+ 'WaitFor' => 1);
+
+ return $ARG{'iArg'};
+
+}
+
+sub removeItem {
+ my $self = shift;
+
+ my $id = shift;
+
+ my %ARG = $self->sendMessage('iCommand' => $::PUKE_MENUDATA_REMOVE_ITEM,
+ 'iArg' => $id);
+
+}
+
+package main;
+
+1;