[Libreoffice-commits] .: 3 commits - basebmp/inc basebmp/README offapi/com offapi/UnoApi_offapi.mk

Tor Lillqvist tml at kemper.freedesktop.org
Sun Jun 10 23:27:00 PDT 2012


 basebmp/README                        |   10 ++++---
 basebmp/inc/basebmp/bitmapdevice.hxx  |   12 ++++----
 offapi/UnoApi_offapi.mk               |    1 
 offapi/com/sun/star/awt/XToolkit2.idl |   46 ++++++++++++++++++++++++++++++++++
 4 files changed, 59 insertions(+), 10 deletions(-)

New commits:
commit 44ecd013335899b6e1735b24899f0c175d00e4d3
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Mon Jun 11 08:19:55 2012 +0300

    Add css.awt.XToolkit2
    
    Work in progress for Android, and possibly iOS, too.
    
    Change-Id: If65765cd781bf1bd28ce96af01adedc07d0eebae

diff --git a/offapi/UnoApi_offapi.mk b/offapi/UnoApi_offapi.mk
index 98cca5f..0242a25 100644
--- a/offapi/UnoApi_offapi.mk
+++ b/offapi/UnoApi_offapi.mk
@@ -1815,6 +1815,7 @@ $(eval $(call gb_UnoApi_add_idlfiles,offapi,offapi/com/sun/star/awt,\
 	XTimeField \
 	XToggleButton \
 	XToolkit \
+	XToolkit2 \
 	XTopWindow \
 	XTopWindow2 \
 	XTopWindowListener \
diff --git a/offapi/com/sun/star/awt/XToolkit2.idl b/offapi/com/sun/star/awt/XToolkit2.idl
new file mode 100644
index 0000000..c174d27
--- /dev/null
+++ b/offapi/com/sun/star/awt/XToolkit2.idl
@@ -0,0 +1,46 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * Copyright 2012 LibreOffice contributors.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#ifndef __com_sun_star_awt_XToolkit2_idl__
+#define __com_sun_star_awt_XToolkit2_idl__
+
+#include <com/sun/star/awt/XToolkit.idl>
+
+module com {  module sun {  module star {  module awt {
+
+/** Work in progress, don't use unless you know what you are doing.
+ */
+
+interface XToolkit2: XToolkit
+{
+  /** Create a bitmap device using a byte buffer allocated outside of UNO territory.
+   *
+   *  @returns the device
+   *
+   *  @param addressOfMemoryBufferForSharedArrayWrapper is the address of a
+   *  (C++) object the exact type of which is to be determined, but the point
+   *  is that it will then be rewrapped into a boost::shared_array of bytes to
+   *  be passed to the basebmp code. shared_array has its own style of
+   *  reference counting, naturally not related to UNO's or Java's, so lots of
+   *  fun stuff to take care of. I won't bother complicating stuff with
+   *  XUnoTunnel here (if it would even be possible to use it), this isn't in
+   *  any way intended to be "generic" anyway, but is experimental work in
+   *  progress, indented just for Android so far, and probably for iOS, too.
+   */
+
+  com::sun::star::awt::XDevice createScreenCompatibleDeviceUsingBuffer( [in] long Width,
+                                                                        [in] long Height,
+                                                                        [in] hyper addressOfMemoryBufferForSharedArrayWrapper );
+};
+
+}; }; }; };
+
+#endif
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
commit 65d17f83f70434729a3ff2833c667ec1cb18bdd0
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Fri Jun 8 12:17:42 2012 +0300

    Avoid misleading term "factory method", just say "function"
    
    Change-Id: I35de0d7eedae5454001fad7e43c6697d9042a829

diff --git a/basebmp/inc/basebmp/bitmapdevice.hxx b/basebmp/inc/basebmp/bitmapdevice.hxx
index 5d67344..b4995ec 100644
--- a/basebmp/inc/basebmp/bitmapdevice.hxx
+++ b/basebmp/inc/basebmp/bitmapdevice.hxx
@@ -74,7 +74,7 @@ protected:
 
 /** Definition of BitmapDevice interface
 
-    Use the createBitmapDevice() factory method to create instances.
+    Use the createBitmapDevice() function to create instances.
 
     Implementation note: the clip mask and bitmap parameter instances
     of BitmapDevice that are passed to individual BitmapDevice
@@ -658,13 +658,13 @@ private:
     boost::scoped_ptr< ImplBitmapDevice > mpImpl;
 };
 
-/** Factory method to create a BitmapDevice for given scanline format
+/** Function to create a BitmapDevice for given scanline format
  */
 BASEBMP_DLLPUBLIC BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVector& rSize,
                                                             bool                      bTopDown,
                                                             sal_Int32                 nScanlineFormat );
 
-/** Factory method to create a BitmapDevice for given scanline format
+/** Function to create a BitmapDevice for given scanline format
     with the given palette
 
     Note: the provided palette must have sufficient size, to satisfy
@@ -676,7 +676,7 @@ BASEBMP_DLLPUBLIC BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVe
                                                             sal_Int32                        nScanlineFormat,
                                                             const PaletteMemorySharedVector& rPalette );
 
-/** Factory method to create a BitmapDevice for given scanline format
+/** Function to create a BitmapDevice for given scanline format
     from the given piece of raw memory and palette
 
     Note: the provided memory must have sufficient size, to store the
@@ -689,7 +689,7 @@ BASEBMP_DLLPUBLIC BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVe
                                                             const PaletteMemorySharedVector& rPalette );
 
 
-/** Factory method to retrieve a subsetted BitmapDevice to the same
+/** Function to retrieve a subsetted BitmapDevice to the same
     memory.
 
     This method creates a second bitmap device instance, which renders
@@ -700,7 +700,7 @@ BASEBMP_DLLPUBLIC BitmapDeviceSharedPtr createBitmapDevice( const basegfx::B2IVe
 BASEBMP_DLLPUBLIC BitmapDeviceSharedPtr subsetBitmapDevice( const BitmapDeviceSharedPtr& rProto,
                                                             const basegfx::B2IBox&       rSubset );
 
-/** Factory method to clone a BitmapDevice from a given prototype.
+/** Function to clone a BitmapDevice from a given prototype.
 
     All attributes (like scanline format and top-down state) are
     copied, only the size can be varied. Note that the prototype's
commit 62d4eb0c8064697abbb91cdf2785777849d29e4a
Author: Tor Lillqvist <tlillqvist at suse.com>
Date:   Fri Jun 8 12:15:28 2012 +0300

    Avoid too long lines
    
    Change-Id: I69d7eac07e384d574ecddbfe63cda0815d27b13b

diff --git a/basebmp/README b/basebmp/README
index f6dc914..7087cea 100644
--- a/basebmp/README
+++ b/basebmp/README
@@ -1,7 +1,9 @@
 Provides a BitmapDevice: the vcl software renderer
 
-Provides algorithms and data types for bitmap graphics
-e.g. line and fill polygon scan conversion, bitmap format iterators, and a SalGraphics-compatible software renderer
+Provides algorithms and data types for bitmap graphics e.g. line and fill
+polygon scan conversion, bitmap format iterators, and a SalGraphics-compatible
+software renderer
 
-Used for example for wmf / svm files.
-E.g. used when you do -headless, and have no DISPLAY set - it's an all-software backend for the LibO graphic backend. also see [git:vcl/headless].
+Used for example for wmf / svm files. E.g. used when you do -headless, and
+have no DISPLAY set - it's an all-software backend for the LibO graphic
+backend. also see [git:vcl/headless].


More information about the Libreoffice-commits mailing list