Mailinglist Archive: yast-commit (518 mails)

< Previous Next >
[yast-commit] r56680 - /trunk/libyui-bindings/swig/python/examples/displayinfo.py
  • From: kkaempf@xxxxxxxxxxxxxxxx
  • Date: Wed, 08 Apr 2009 09:48:16 -0000
  • Message-id: <E1LrUOG-0002b7-Fl@xxxxxxxxxxxxxxxx>
Author: kkaempf
Date: Wed Apr 8 11:48:16 2009
New Revision: 56680

URL: http://svn.opensuse.org/viewcvs/yast?rev=56680&view=rev
Log:
re-implement UI::GetDisplayInfo from ycp-ui-bindings (high-level, ycp only)
using libyui-bindings (low-level, generic C++)

Added:
trunk/libyui-bindings/swig/python/examples/displayinfo.py

Added: trunk/libyui-bindings/swig/python/examples/displayinfo.py
URL:
http://svn.opensuse.org/viewcvs/yast/trunk/libyui-bindings/swig/python/examples/displayinfo.py?rev=56680&view=auto
==============================================================================
--- trunk/libyui-bindings/swig/python/examples/displayinfo.py (added)
+++ trunk/libyui-bindings/swig/python/examples/displayinfo.py Wed Apr 8
11:48:16 2009
@@ -0,0 +1,38 @@
+#
+# map disp = UI::GetDisplayInfo();
+# is a YCP-only function defined in ycp-ui-bindings/src/YCP_UI.cc
+#
+
+import sys
+sys.path.insert(0,'../../../build/swig/python')
+import yui
+
+appl = yui.YUI.application()
+print "Width ", appl.displayWidth()
+print "Height ", appl.displayHeight()
+print "Depth ", appl.displayDepth()
+print "Colors ", appl.displayColors()
+print "DefaultWidth ", appl.defaultWidth()
+print "DefaultHeight ", appl.defaultHeight()
+print "TextMode ", appl.isTextMode()
+print "HasImageSupport ", appl.hasImageSupport()
+print "HasIconSupport ", appl.hasIconSupport()
+print "HasAnimationSupport ", appl.hasAnimationSupport()
+print "HasFullUtf8Support ", appl.hasFullUtf8Support()
+print "RichTextSupportsTable ", appl.richTextSupportsTable()
+print "LeftHandedMouse ", appl.leftHandedMouse()
+log = yui.YUILog.instance()
+print "y2debug ", log.debugLoggingEnabled()
+
+optional = yui.YUI.optionalWidgetFactory()
+
+print "Has wizard ", optional.hasWizard()
+
+#factory = yui.YUI.widgetFactory()
+#dialog = factory.createPopupDialog()
+
+#vbox = factory.createVBox( dialog )
+#factory.createLabel( vbox, "Hello, World!" )
+#factory.createPushButton( vbox, "&OK" )
+#event = dialog.waitForEvent()
+#dialog.destroy()

--
To unsubscribe, e-mail: yast-commit+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: yast-commit+help@xxxxxxxxxxxx

< Previous Next >
This Thread
  • No further messages