home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
wpentk.zip
/
WBPENTK2.DSK
/
PENBTNDV.IDL
< prev
next >
Wrap
Text File
|
1994-09-28
|
9KB
|
341 lines
//# This file was generated by the SOM Compiler.
//# FileName: penbtndv.id2.
//# Generated using:
//# SOM Precompiler somopc: 2.7
//# SOM Emitter emitidl: 2.22
// SCC: @(#) 71 4/12/93 12:02:47 1.3 @(#)
// Module Header
//
// Module Name: PENBTNDV
//
// OS/2 Presentation Manager Workplace class definitions
//
// Copyright (c) International Business Machines Corporation 1992
//
#ifndef penbtndv_idl
#define penbtndv_idl
#include "wpabs.idl"
#include <somcls.idl>
typedef somToken PPENEVENTDATA;
typedef somToken PBUTTON;
//# This number will be used by the ih file.
//# It MUST be kept in sync with whatever is emitted to the .ih file.
//# Otherwise, the .c files & .ih files will be out-of-sync
#define MAXCOMMANDS 15
interface M_PenButtonDevice;
interface PenButtonDevice : WPAbstract
//# Comment for parent WPAbstract:
//---Symbol parentComment is undefined---
//
// CLASS: PenButtonDevice
//
// CLASS HIERARCHY:
// SOMObject
// └── WPObject
// └── WPAbstract
// └── PenButtonDevice
//
// DESCRIPTION:
// This is the Pen Button Device support class
//
{
ULONG penAddButtonsMappingsPage(in HWND hwndNotebook);
//
// METHOD: penAddButtonsMappingsPage ( ) PRIVATE
// (X) PUBLIC
// PURPOSE:
// Add the Buttons Mapping configuration page to the buttons settings
// notebook
//
ULONG penQueryButtonData(in PPENEVENTDATA pPenEventData);
//
// METHOD: penQueryButtonData ( ) PRIVATE
// (X) PUBLIC
// PURPOSE:
// The penQueryButtonData method is called to allow the instance
// to query its default button bitmaps to be used on the buttons page.
//
BOOL penSetButtonData(in PPENEVENTDATA pPenEventData);
//
// METHOD: penSetButtonData ( ) PRIVATE
// (X) PUBLIC
// PURPOSE:
// The penSetButtonData method is called to allow the instance
// to set its default button bitmaps to be used on the buttons page.
//
#ifdef __PRIVATE__
BOOL penSetDriverName(in PSZ pszName);
//
// METHOD: penSetDriverName (X) PRIVATE
// ( ) PUBLIC
// PURPOSE:
// Set the Driver Name
//
BOOL penSetDeviceName(in PSZ pszName);
//
// METHOD: penSetDeviceName (X) PRIVATE
// ( ) PUBLIC
// PURPOSE:
// Set the Device Name
//
BOOL penSetButtonDeviceName(in PSZ pszName);
//
// METHOD: penSetButtonDeviceName (X) PRIVATE
// ( ) PUBLIC
// PURPOSE:
// Set the Button Device Name
//
BOOL penSetBarrelCount(in ULONG ulCount);
//
// METHOD: penSetBarrelCount (X) PRIVATE
// ( ) PUBLIC
// PURPOSE:
// Set the number of barrel buttons for the device
//
PSZ penQueryDriverName();
//
// METHOD: penQueryDriverName (X) PRIVATE
// ( ) PUBLIC
// PURPOSE:
// Return the Driver Name
//
PSZ penQueryDeviceName();
//
// METHOD: penQueryDeviceName (X) PRIVATE
// ( ) PUBLIC
// PURPOSE:
// Return the Device Name
//
PSZ penQueryButtonDeviceName();
//
// METHOD: penQueryButtonDeviceName (X) PRIVATE
// ( ) PUBLIC
// PURPOSE:
// Return the ButtonDevice Name
//
ULONG penQueryBarrelCount();
//
// METHOD: penQueryBarrelCount (X) PRIVATE
// ( ) PUBLIC
// PURPOSE:
// Return the number of barrel buttons for the device
//
#endif
#ifdef __SOMIDL__
implementation {
releaseorder: penAddButtonsMappingsPage,penQueryButtonData,penSetButtonData,
penQueryDriverName,penQueryDeviceName,penQueryButtonDeviceName,
penQueryBarrelCount,penSetDriverName,penSetDeviceName,
penSetButtonDeviceName,penSetBarrelCount;
//# Class Modifiers
local;
functionprefix = btn_;
majorversion = 1;
minorversion = 1;
filestem = penbtndv;
metaclass = M_PenButtonDevice;
callstyle = oidl;
passthru C_ih_before = ""
" #define MAXBUTTONNAME 20"
" #define MAXCOMMANDS 15 /* SHOULD ALWAYS BE AT LEAST WHAT */"
" /* NUMBER OF BUILT-INS IS IN PENPMI.H */"
""
""
" typedef struct _BUTTON"
" {"
" USHORT item;"
" ULONG buttonId;"
" UCHAR szButtonName[MAXBUTTONNAME];"
" USHORT command;"
" USHORT oldCommand;"
" } BUTTON, *PBUTTON;"
""
#ifdef __PRIVATE__
" #define BUTTONDEV_VERSION_MAJOR 1"
" #define BUTTONDEV_VERSION_MINOR 1"
""
" #define MSTRLEN 20"
""
" #define DEFAULT_BMP_SIZE 20"
" #define BITMAP_SPACING 8"
" #define MAXCOMMANDSIZE 20"
" #define MAXNUMOFBUTTONS 16"
""
" #define BUTTONDLG_HELPRES 40083"
#endif /* __PRIVATE__ */
"";
//# Public portion
//
// #define MAXBUTTONNAME 20
// #define MAXCOMMANDS 15 /* SHOULD ALWAYS BE AT LEAST WHAT */
// /* NUMBER OF BUILT-INS IS IN PENPMI.H */
//
//
// typedef struct _BUTTON
// {
// USHORT item;
// ULONG buttonId;
// UCHAR szButtonName[MAXBUTTONNAME];
// USHORT command;
// USHORT oldCommand;
// } BUTTON, *PBUTTON;
//
//# Private portion
//
// #define BUTTONDEV_VERSION_MAJOR 1
// #define BUTTONDEV_VERSION_MINOR 1
//
// #define MSTRLEN 20
//
// #define DEFAULT_BMP_SIZE 20
// #define BITMAP_SPACING 8
// #define MAXCOMMANDSIZE 20
// #define MAXNUMOFBUTTONS 16
//
// #define BUTTONDLG_HELPRES 40083
//
passthru C_h_before = ""
" #define MAXBUTTONNAME 20"
""
" typedef struct _PENEVENTDATA"
" {"
" PVOID pReserved1;"
" HMODULE hModule;"
" ULONG ulResourceId;"
" CHAR pszName[MAXBUTTONNAME];"
" } PENEVENTDATA, *PPENEVENTDATA;"
"";
//
// #define MAXBUTTONNAME 20
//
// typedef struct _PENEVENTDATA
// {
// PVOID pReserved1;
// HMODULE hModule;
// ULONG ulResourceId;
// CHAR pszName[MAXBUTTONNAME];
// } PENEVENTDATA, *PPENEVENTDATA;
//
//# Internal Instance Variables
PPENEVENTDATA pInstanceEventData;
UCHAR DriverName[128];
UCHAR DeviceName[128];
UCHAR ButtonDeviceName[128];
ULONG ulBarrelCount; // Number of barrel buttons configured
PBUTTON pButton; // Button / command structure
ULONG ulButtonCount; // Number of buttons configured
ULONG ulMyCommandCount; // Number of mappable commands
ULONG aMyCommandList[MAXCOMMANDS];// Array of mappable commands
//# Method Modifiers
wpAddSettingsPages: override;
wpSetup: override;
wpSaveState: override;
wpRestoreState: override;
wpInitData: override;
wpUnInitData: override;
//# Data Modifiers
DriverName: internal;
DeviceName: internal;
ButtonDeviceName: internal;
ulBarrelCount: internal;
pButton: internal;
ulButtonCount: internal;
ulMyCommandCount: internal;
aMyCommandList: internal;
#ifdef __PRIVATE__
//# Data Modifiers
#endif
};
#endif /* __SOMIDL__ */
};
interface M_PenButtonDevice
//# Comment for parent WPAbstract:
//---Symbol parentComment is undefined---
{
ULONG penclsQueryButtonData(in PPENEVENTDATA pPenEventData);
//
// METHOD: penclsQueryButtonData ( ) PRIVATE
// (X) PUBLIC
// PURPOSE:
// The penclsQueryButtonData method is called to allow the class object
// to specify the default button bitmaps to be used on the buttons page
// for its instances.
//
#ifdef __SOMIDL__
implementation {
releaseorder: penclsQueryButtonData;
//# Class Modifiers
local;
functionprefix = btnM_;
majorversion = 1;
minorversion = 1;
filestem = penbtndv;
callstyle = oidl;
//# Method Modifiers
wpclsInitData: override;
wpclsNew: override;
};
#endif /* __SOMIDL__ */
};
#endif /* penbtndv_idl */