Omnis Studio External Components

Creating your own External Components

  
  
  

Omnis Software Ltd

February 2017

  
  
  

  
 

   

 
ACKNOWLEGEMENTS

The software this document describes is furnished under a license agreement. The software may be used or copied only in accordance with the terms of the agreement. Names of persons, corporations, or products used in the tutorials and examples of this manual are fictitious. No part of this publication may be reproduced, transmitted, stored in a retrieval system or translated into any language in any form by any means without the written permission of Omnis Software Ltd.
© 1999-2009 The Apache Software Foundation. All rights reserved.
This product includes software developed by the Apache Software Foundation (http://www.apache.org/).
OMNIS® and Omnis Studio® are registered trademarks of Omnis Software Ltd.
Microsoft, MS, MS-DOS, Visual Basic, Windows, Windows 95, Win32, Win32s are registered trademarks, and Windows NT, Visual C++ are trademarks of Microsoft Corporation in the US and other countries.
IBM, DB2, and INFORMIX are registered trademarks of International Business Machines Corporation.
UNIX is a registered trademark in the US and other countries exclusively licensed by X/Open Company Ltd.
Sun, Sun Microsystems, the Sun Logo, Solaris, Java, and Catalyst are trademarks or registered trademarks of Sun Microsystems Inc.
MySQL is a registered trademark of MySQL AB in the United States, the European Union and other countries (www.mysql.com).
ORACLE is a registered trademark and SQL*NET is a trademark of Oracle Corporation.
SYBASE, Net-Library, Open Client, DB-Library and CT-Library are registered trademarks of Sybase Inc.
Acrobat is a trademark of Adobe Systems, Inc.
Apple, the Apple logo, AppleTalk, and Macintosh are registered trademarks and MacOS, Power Macintosh and PowerPC are trademarks of Apple Computer, Inc.
HP-UX is a trademark of Hewlett Packard.
OSF/Motif is a trademark of the Open Software Foundation.
CodeWarrior is a trademark of Metrowerks, Inc.
This software is based in part on the work of the Independent JPEG Group.
This software is based in part of the work of the FreeType Team.
Other products mentioned are trademarks or registered trademarks of their corporations.

  

DISCLAIMER

This document is provided as a free resource to developers wishing to write custom components for use with Omnis Studio. We hope you find the enclosed material useful and we have endeavoured to ensure its accuracy at time of print. Your attention is drawn to the terms of your Omnis Developer Partner Program contract (ODPP) which excludes development support for customised Omnis external components. This material supplements other external component documentation published by TigerLogic and is provided as a self-help resource.
Use and development of the supplied source code and associated utilities is carried out at the discretion of the external developer and the developer assumes responsibility for any consequential damage and/or loss of data which may result.
IN NO EVENT WILL TIGERLOGIC BE LIABLE FOR ANY INDIRECT, PUNITIVE, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES HOWEVER THEY MAY ARISE AND EVEN IF TIGERLOGIC HAS BEEN PREVIOUSLY ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

  
  
  
  
  
  

About This Manual

This manual describes how you can create your own external components to integrate into Omnis Studio. You can download sample source code from the Omnis website to help you do this.

For more information about Omnis external components, and to download the latest source files, please go to:

This manual introduces key development topics and expands to form a reference guide for each of the main APIs provided by the Omnis component library:

Chapter 1 Omnis External Components
Introduces the different types of Omnis external components. There is a brief tutorial to get you up-and-running with the Generic visual component plus general notes on building and testing.

Chapter 2 Structures, Messages and Functions
Discusses key structures used by external components and how they are used in conjunction with messages sent to your component. There are also descriptions of general purpose functions you can use as well as memory and resource management functions

Chapter 3 Simple String Management
Introduces the strxxx() class family which facilitates simple management of text strings of up to 255 characters.

Chapter 4 Unicode Character Conversion
Discusses the issues involved in writing Unicode compatible components and also lists data types, utility classes and helper functions you can use to convert character data between various Unicode encodings.

Chapter 5 Managing Icons and Cursors
Introduces the EXTBMPref() class which can be used to manage icons in the Omnis icon datafiles. The EXTCURref() class can be used to assign custom mouse cursors for use with your component.

Chapter 6 Handling Keyboard Input
Discusses the qkey class and other functions, which allows your component to process keyboard input.

Chapter 7 Managing File Data
Discusses the FILE API commands and their wrapper class; EXTfile() which provides your component with cross-platform access to files and folders.

Chapter 8 Omnis Data Collections
This chapter discusses the CRB API and its associated wrapper class; EXTcrb() which is used to manage Omnis data collections. An Omnis data collection is a block of data with a variable number of data items, providing your components with simple, self-extending, random access blocks of memory.

Chapter 9 Omnis List Data
Introduces the EXTqlist() class which gives your component access to Omnis list data. Using EXTqlist(), you can also create, interrogate and modify lists to pass back to Omnis.

Chapter 10 Omnis Field Values
The EXTfldval() class is a generic storage object which gives your component access to Omnis field values. You can get and set EXTfldvals using a variety of data types and also convert between different types.

Chapter 11 Window Management
This chapter discusses the HWND module and its associated window messages, which visual components may be required to process. The HWND module provides many drawing, resizing and status functions.

Chapter 12 Graphics Management
The Graphics Drawing Interface module (GDI) provides many drawing, positioning and formatting functions for use by visual components. This chapter also introduces associated structures, data types and constants.

Chapter 13 Printer Management
The Cross-platform printer interface module (PRI) provides your component with printing and reporting functions which are hardware-independent. This chapter also discusses the associated messages your component may need to process as well as associated structures and constants.

Chapter 14 DAM API Reference
This chapter discusses additional classes, structures and techniques you can use to develop custom non-visual components to access Relational Database Management Systems using a consistent programming interface.

Appendix A Porting External Components to Mach-O
This chapter discusses the issues involved in writing components using Mac OSX 10.5 and Xcode and porting older-style MacOS 9 projects from Code Warrior.