maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Applications (https://talk.maemo.org/forumdisplay.php?f=41)
-   -   [Announce] Queen BeeCon Widget: Super powerful and customizable Widget Generation Engine - Official Thread (https://talk.maemo.org/showthread.php?t=45388)

qwerty12 2010-05-19 22:05

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by No!No!No!Yes! (Post 657980)
I encourage you to suggest possible enhancements or wishlists in this area.

These aren't suggestions as I realise implementing them would take a while (GObject; **** yeah! [Though, props to Vala - implementing properties and D-Bus methods and signals is so simple in Vala that it's almost orgasmic...), but ideas of what can be done with D-Bus if you ever feel like extending your brilliant efforts.

* If your object uses GObject properties for settings etc., you can manipulate them with the standard org.freedesktop.properties (something like that interface) as DBus-GLib will export them. You've already provided get/set_param methods :)
* You can also allow signals to emitted - create them in the GObject Way and define them in your interface XML. You could have one emitted for when a widget is updated.

No!No!No!Yes! 2010-05-20 06:38

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by qwerty12 (Post 666732)
These aren't suggestions as I realise implementing them would take a while (GObject; **** yeah! [Though, props to Vala - implementing properties and D-Bus methods and signals is so simple in Vala that it's almost orgasmic...), but ideas of what can be done with D-Bus if you ever feel like extending your brilliant efforts.

* If your object uses GObject properties for settings etc., you can manipulate them with the standard org.freedesktop.properties (something like that interface) as DBus-GLib will export them. You've already provided get/set_param methods :)
* You can also allow signals to emitted - create them in the GObject Way and define them in your interface XML. You could have one emitted for when a widget is updated.

Appreciate your tips, thanks Faheem.
As I'm pretty very old school as a coder - my last C/C++ lines happened almost 20 years ago :D - it'll take some time to digest you precious contribution :o

However I also have one more issue which is bothering me since QBW was born. I already opened a thread in Development forum but no brave member came up with suggestions.

I hope I have a better chance now that community has gone much more cerebral about Maemo, N900 and Hildon-Desktop.
I repost here my original request as it could move QBW a step further with still one new possibility.

Thanks to new extended IPC mechanism it could be now possible to treat many QBW instances as one intercommunicating entity thus allowing stacked instances (and hot spots over beecons) like in this example:

Quote:

Originally Posted by No!No!No!Yes! (Post 582390)
I believe the cheapest solution could be this one:

http://i41.tinypic.com/nei7hy.png http://i39.tinypic.com/2zf7j8y.png http://i44.tinypic.com/eugi69.png

With "A" being the "status" beecon (with status querying script updating manually, every startup, on desktop change, every 30 or so seconds updated via new QBW IPC features by "B") and "B" being the "toggle" beecon/button (with status toggling script just for manual interaction)

http://i42.tinypic.com/wu4bxi.png http://i44.tinypic.com/11m8ahz.png http://i43.tinypic.com/2u4lw5g.png

ISSUE: Still unable to programmatically control the stacking of different widgets on desktop.

This was the original enigma:
Quote:

Originally Posted by No!No!No!Yes! (Post 538205)
Hi, as per subject I need to programmatically control the overlaying positions of 3 instances of the same multi-instance hildon desktop (hildon-home) widget.
Programming Language is C.

I basically need to send the top most yellow box behind the red and green boxes (the very-very back) while I'm in the top most widget's settings dialog box.

http://i46.tinypic.com/2vcgjye.png

http://i48.tinypic.com/2qukdqh.png

I've already tried:
  1. gtk_window_set_keep_below gtk_window_set_keep_below
  2. HildonWindowStack family functions

No success so far... anyone can help?

Bye!


qwerty12 2010-05-20 08:16

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by No!No!No!Yes! (Post 667111)
Appreciate your tips, thanks Faheem.
As I'm pretty very old school as a coder - my last C/C++ lines happened almost 20 years ago :D - it'll take some time to digest you precious contribution :o

Oh, believe me, I'm not a good coder at all. Far from it...

Anyway, for the signals thing (if you think it's a good idea):
http://slexy.org/view/s2JQ0NMQ5R

(Very rushed, sorry)

Results in this when monitoring d-bus:
Quote:

signal sender=:1.32 -> dest=(null destination) serial=1085 path=/com/nokia/qbw; interface=com.nokia.qbw; member=Updated
int32 0
Quote:

Originally Posted by No!No!No!Yes! (Post 667111)
This was the original enigma:

I - as expected - do not know, sorry. The best I could point you to is hd_home_view_add_applet in hildon-desktop's source but it's a private function and works on ClutterApplets...

No!No!No!Yes! 2010-05-20 10:47

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by qwerty12 (Post 667216)
Oh, believe me, I'm not a good coder at all. Far from it...

Anyway, for the signals thing (if you think it's a good idea):
http://slexy.org/view/s2JQ0NMQ5R

Idea absolutely integrated ... got one more issue, though;

xml changed as I need QBW Instance ID which issued signal:
Code:

        <signal name="sig_content_updated">
          <arg type="s"/>
          <arg type="i"/>
        </signal>

now:
Code:

g_cclosure_marshal_VOID__INT
doesn't seem to be adequate any more but dunno how to create new marshaller in queen-beecon-service.h:
Code:

g_cclosure_marshal_VOID__STRING__INT
I tried
Code:

        queen_beecon_signals[SIG_CONTENT_UPDATED] = g_signal_new("sig_content_updated",
                                                                        QUEEN_BEECON_TYPE,
                                                                        G_SIGNAL_RUN_LAST,
                                                                        G_STRUCT_OFFSET (QueenBeeconClass, queen_beecon_dbus_sig_content_updated),
                                                                        NULL, NULL,
                                                                        dbus_glib_marshal_queen_beecon_BOOLEAN__STRING_INT_POINTER, //g_cclosure_marshal_VOID__INT,
                                                                        G_TYPE_NONE, 2,
                                                                        G_TYPE_STRING,
                                                                        G_TYPE_INT);

but I still keep not receiving any signal on the bus.

qwerty12 2010-05-20 12:38

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by No!No!No!Yes! (Post 667393)
Idea absolutely integrated ... got one more issue, though;

xml changed as I need QBW Instance ID which issued signal:
Code:

        <signal name="sig_content_updated">
          <arg type="s"/>
          <arg type="i"/>
        </signal>

now:
Code:

g_cclosure_marshal_VOID__INT
doesn't seem to be adequate any more but dunno how to create new marshaller in queen-beecon-service.h:
Code:

g_cclosure_marshal_VOID__STRING__INT
I tried
Code:

        queen_beecon_signals[SIG_CONTENT_UPDATED] = g_signal_new("sig_content_updated",
                                                                        QUEEN_BEECON_TYPE,
                                                                        G_SIGNAL_RUN_LAST,
                                                                        G_STRUCT_OFFSET (QueenBeeconClass, queen_beecon_dbus_sig_content_updated),
                                                                        NULL, NULL,
                                                                        dbus_glib_marshal_queen_beecon_BOOLEAN__STRING_INT_POINTER, //g_cclosure_marshal_VOID__INT,
                                                                        G_TYPE_NONE, 2,
                                                                        G_TYPE_STRING,
                                                                        G_TYPE_INT);

but I still keep not receiving any signal on the bus.

I believe you need to generate the marshaller yourself. This is how I do it in headset-control:

Quote:

Originally Posted by configure.ac
AC_PATH_PROG([GLIBGENMARSHAL], [`$PKG_CONFIG glib-2.0 --variable=glib_genmarshal`])
AC_SUBST([GLIBGENMARSHAL])

Quote:

Originally Posted by src/Makefile.am
INCLUDES = -DG_LOG_DOMAIN=\"@PACKAGE@\"

BUILT_SOURCES = hal-marshal.h hal-marshal.c headset-control-service.h
noinst_HEADERS = $(BUILT_SOURCES)

EXTRA_DIST = hal-marshal.list headset-control-service.xml
CLEANFILES = $(BUILT_SOURCES)

hal-marshal.h: hal-marshal.list
$(GLIBGENMARSHAL) --prefix=hal_marshal $< --header > $@


hal-marshal.c: hal-marshal.list hal-marshal.h
echo '#include "hal-marshal.h"' > $@
$(GLIBGENMARSHAL) --prefix=hal_marshal $< --body >> $@


headset-control-service.h: headset-control-service.xml
$(DBUSBINDINGTOOL) --mode=glib-server --prefix=headset_control $< --output=$@

bin_PROGRAMS = headset-control

headset_control_CFLAGS = $(HEADSET_CONTROL_CFLAGS)
headset_control_LDADD = $(HEADSET_CONTROL_LIBS)

headset_control_SOURCES = hal-marshal.h hal-marshal.c headset-control-obj.h headset-control-obj.c headset-controld.c

Quote:

Originally Posted by hal-marshal.list
VOID:STRING,STRING


No!No!No!Yes! 2010-05-20 20:30

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Brewery update:

DBUS Methods & Parameters
QBW implements the following list of methods to trigger specific actions:
Implemented (Internal Testing in Scratchbox) dbus_method_monitor Toggle on-screen yellow notification message of incoming DBUS method requests for destination Instance (for debug purposes)
Implemented (Internal Testing in Scratchbox) show Give show impulse to a QBW
Implemented (Internal Testing in Scratchbox) hide Give hide impulse to a QBW
Implemented (Internal Testing in Scratchbox) wakeup Give wake up impulse to a QBW and update content and layout
Implemented (Internal Testing in Scratchbox) sleep Give sleep/disable/minimize impulse to a QBW
Implemented (Internal Testing in Scratchbox) update_content Give impulse to a QBW for content update
Implemented (Internal Testing in Scratchbox) update_layout Give impulse to a QBW QBW for layout update
Implemented (Internal Testing in Scratchbox) exec Give other QBWs one-shot alternative scripts/commands to execute and update content accordingly
Implemented (Internal Testing in Scratchbox) set_param_string Change and store QBW settings parameter of type string
Implemented (Internal Testing in Scratchbox) set_param_int32 Change and store QBW settings parameter of type int
Implemented (Internal Testing in Scratchbox) set_param_uint32 Change and store QBW settings parameter of type uint
Implemented (Internal Testing in Scratchbox) set_param_double Change and store QBW settings parameter of type double
Implemented (Internal Testing in Scratchbox) set_param_boolean Change and store QBW settings parameter of type boolean
Implemented (Internal Testing in Scratchbox) get_param Get QBW settings parameter
Implemented (Internal Testing in Scratchbox) set_position Set QBW position on desktop
Implemented (Internal Testing in Scratchbox) get_position Get QBW position on desktop
Implemented (Internal Testing in Scratchbox) get_exit_status Retrieve other beecon's last executed commands exit status

DBUS Signals & Parameters
QBW issues the following list of signals to notify the "world" about predefined conditions and events.
Implemented (Internal Testing in Scratchbox) signal_content_update Issued when QBW Instance executes and return and exit status

@qwerty12 ... weeeeewwww!!! fortunately no need for extra marshalling as it turned out Instance ID reaches the DBUS PATH...
Code:

[sbox-FREMANTLE_X86: ~] > run-standalone.sh dbus-monitor "interface='oh.no.more.qbw'"
signal sender=org.freedesktop.DBus -> dest=:1.29 serial=2 path=/org/freedesktop/DBus; interface=org.freedesktop.DBus; member=NameAcquired
  string ":1.29"
signal sender=:1.13 -> dest=(null destination) serial=44 path=/oh/no/more/qbwid2; interface=oh.no.more.qbw; member=sig_content_updated
  string ""
  int32 0


No!No!No!Yes! 2010-05-20 21:52

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Here's a Demo Video of DBUS interaction for QBW
http://i50.tinypic.com/10xy06q.jpg

mrl0n3ly714 2010-05-21 03:20

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
is there a way we can save the icons, command and size font all together...?

mrl0n3ly714 2010-05-21 04:42

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
it would be kkool if you can add one more feature in it, the preview showing a size ,colors,....base on the config so you dont have to save and back out and save and back out to edit the config, would save time and would be nice see the design.

No!No!No!Yes! 2010-05-21 05:48

Re: [Announce] Queen BeeCon Widget: Customizable and flexible monitoring tool.
 
Quote:

Originally Posted by mrl0n3ly714 (Post 668701)
is there a way we can save the icons, command and size font all together...?

All supported Backup/Restore/Save/Load features are in the WIKI HOW TO
I'm mainly focusing in developing Core functionalities right now.
Service functionalities will maybe come once release is stable and tested.


All times are GMT. The time now is 18:24.

vBulletin® Version 3.8.8