Global platform header (<PalmOS.h>) removed from public wx-headers (but included in wxprec.h) with all consequences in wxPalmOS specific API.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba 2005-07-01 19:36:58 +00:00
parent 6c99cd3d8c
commit 20bc5ad8dd
33 changed files with 183 additions and 100 deletions

View File

@ -653,6 +653,10 @@ enum { wxDefaultCoord = -1 };
/* define fixed length types */
/* ---------------------------------------------------------------------------- */
#if defined(__WXPALMOS__) || defined(__MINGW32__)
#include <sys/types.h>
#endif
/* chars are always one byte (by definition), shorts are always two (in */
/* practice) */
@ -952,7 +956,6 @@ inline void *wxUIntToPtr(wxUIntPtr p)
/* Make sure ssize_t is defined (a signed type the same size as size_t) */
/* HAVE_SSIZE_T should be defined for compiliers that already have it */
#ifdef __MINGW32__
#include <sys/types.h>
#if defined(_SSIZE_T_) && !defined(HAVE_SSIZE_T)
#define HAVE_SSIZE_T
#endif
@ -2452,6 +2455,7 @@ typedef WX_NSView WXWidget; /* wxWidgets BASE definition */
#if defined(__WXPALMOS__)
typedef void * WXHWND;
typedef void * WXHANDLE;
typedef void * WXHICON;
typedef void * WXHFONT;
@ -2474,9 +2478,13 @@ typedef unsigned short WXWORD;
typedef unsigned long WXCOLORREF;
typedef struct tagMSG WXMSG;
typedef WinHandle WXWINHANDLE;
typedef WXHWND WXWINHANDLE; /* WinHandle of PalmOS */
typedef WXWINHANDLE WXWidget;
typedef void * WXFORMPTR;
typedef void * WXEVENTPTR;
typedef void * WXRECTANGLEPTR;
#endif /* __WXPALMOS__ */

View File

@ -93,16 +93,21 @@ extern int WXDLLEXPORT
wxEntry();
#define IMPLEMENT_WXWIN_MAIN \
\
extern "C" { \
\
uint32_t PilotMain(uint16_t cmd, MemPtr cmdPBP, uint16_t launchFlags) \
{ \
switch (cmd) { \
case sysAppLaunchCmdNormalLaunch: \
case 0 /* sysAppLaunchCmdNormalLaunch */ : \
wxEntry(); \
break; \
default: \
break; \
} \
return errNone; \
return 0 /* errNone */ ; \
} \
\
}
#endif // _WX_APP_H_

View File

@ -74,8 +74,8 @@ public:
protected:
// regardless how deeply we are in wxWidgets hierarchy always get correct form
FormType* GetParentForm() const;
FormType* GetObjectFormIndex(uint16_t& index) const;
WXFORMPTR GetParentForm() const;
WXFORMPTR GetObjectFormIndex(uint16_t& index) const;
void* GetObjectPtr() const;
// choose the default border for this window
@ -105,7 +105,7 @@ protected:
// size parameter (style parameter is not needed because m_windowStyle is
// supposed to had been already set and so is used instead when this
// function is called)
bool PalmCreateControl(ControlStyleType style,
bool PalmCreateControl(int palmStyle,
const wxString& label,
const wxPoint& pos,
const wxSize& size,
@ -117,7 +117,7 @@ protected:
const wxSize& size,
bool editable,
bool underlined,
JustificationType justification);
int justification);
inline bool IsPalmField() const { return m_palmField; }
// this is a helper for the derived class GetClassDefaultAttributes()
@ -148,8 +148,8 @@ private:
// common part of all ctors
void Init();
virtual void DoGetBounds( RectangleType &rect ) const;
virtual void DoSetBounds( RectangleType &rect );
virtual void DoGetBounds( WXRECTANGLEPTR rect ) const;
virtual void DoSetBounds( WXRECTANGLEPTR rect );
DECLARE_DYNAMIC_CLASS_NO_COPY(wxControl)
DECLARE_EVENT_TABLE()

View File

@ -70,7 +70,7 @@ public:
#if wxUSE_MENUS_NATIVE
bool HandleMenuOpen();
bool HandleMenuSelect(EventType* event);
bool HandleMenuSelect(WXEVENTPTR event);
#endif // wxUSE_MENUS_NATIVE
protected:

View File

@ -37,11 +37,11 @@ public:
void Resume();
virtual bool Show( bool show = true );
Boolean Callback(PrgCallbackData *data);
Boolean Callback(/*PrgCallbackData */ void *data);
private:
ProgressType *m_prgFrame;
/*ProgressType*/ void *m_prgFrame;
wxString m_msg;
int m_max,m_cur;
bool m_canSkip;

View File

@ -66,7 +66,7 @@ private:
uint8_t m_groupID;
// pushButtonCtl or checkboxCtl
ControlStyleType m_radioStyle;
int m_radioStyle;
DECLARE_DYNAMIC_CLASS_NO_COPY(wxRadioButton)
};

View File

@ -76,7 +76,7 @@ public:
// send a notification event, return true if processed
bool SendUpdatedEvent();
bool SendScrollEvent(EventType* event);
bool SendScrollEvent(WXEVENTPTR event);
protected:

View File

@ -82,12 +82,12 @@ public:
wxWindow *GetLastFocus() const { return m_winLastFocused; }
// interface to native frame structure
FormType *GetForm() const;
WXFORMPTR GetForm() const;
// handle native events
bool HandleControlSelect(EventType* event);
bool HandleControlRepeat(EventType* event);
bool HandleSize(EventType* event);
bool HandleControlSelect(WXEVENTPTR event);
bool HandleControlRepeat(WXEVENTPTR event);
bool HandleSize(WXEVENTPTR event);
virtual WXWINHANDLE GetWinHandle() const;
@ -125,7 +125,5 @@ protected:
DECLARE_NO_COPY_CLASS(wxTopLevelWindowPalm)
};
static Boolean FrameFormHandleEvent(EventType* pEvent);
#endif // _WX_PALMOS_TOPLEVEL_H_

View File

@ -211,11 +211,11 @@ public:
protected:
// the window handle
WinHandle m_handle;
FormType *FrameForm;
WXWINHANDLE m_handle;
WXFORMPTR FrameForm;
FormType *GetFormPtr();
void SetFormPtr(FormType *FormPtr);
WXFORMPTR GetFormPtr();
void SetFormPtr(WXFORMPTR FormPtr);
// additional (Palm specific) flags
bool m_mouseInWindow:1;

View File

@ -472,12 +472,6 @@
# include "wx/msw/wince/libraries.h"
#endif
/* Force inclusion of main PalmOS header: */
#ifdef __WXPALMOS__
# include <PalmOS.h>
# undef Abs
#endif
/*
This macro can be used to test the gcc version and can be used like this:

View File

@ -21,7 +21,7 @@
#include "wx/defs.h" /* for wxUSE_UNICODE */
#if defined(HAVE_STRTOK_R) && defined(__DARWIN__) && defined(_MSL_USING_MW_C_HEADERS) && _MSL_USING_MW_C_HEADERS
char *strtok_r(char *, const char *, char **);
char *strtok_r(char *, const char *, char **);
#endif
/* check whether we have wchar_t and which size it is if we do */
@ -127,7 +127,9 @@
#define wxHAVE_TCHAR_SUPPORT
#elif defined(__DMC__)
#define wxHAVE_TCHAR_SUPPORT
#elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 ) && !defined(__WXPALMOS__)
#elif defined(__WXPALMOS__)
#include <stddef.h>
#elif defined(__MINGW32__) && wxCHECK_W32API_VERSION( 1, 0 )
#define wxHAVE_TCHAR_SUPPORT
#include <stddef.h>
#include <string.h>
@ -387,7 +389,7 @@
/* time.h functions */
#define wxAsctime _tasctime
#define wxCtime _tctime
#define wxMbstowcs mbstowcs
#define wxWcstombs wcstombs
#else /* !TCHAR-aware compilers */

View File

@ -45,6 +45,11 @@
#include "wx/msw/wrapwin.h"
#endif
// include all PalmOS headers at once
#ifdef __WXPALMOS__
# include <PalmOS.h>
#endif
// include the most common wx headers
#include "wx/wx.h"

View File

@ -83,6 +83,12 @@
#include <DriverServices.h>
#endif
#ifdef __WXPALMOS__
#include <DateTime.h>
#include <TimeMgr.h>
#include <SystemMgr.h>
#endif
// ----------------------------------------------------------------------------
// macros
// ----------------------------------------------------------------------------

View File

@ -44,6 +44,9 @@
#include "wx/stockitem.h"
#include <Control.h>
#include <Form.h>
// ----------------------------------------------------------------------------
// macros
// ----------------------------------------------------------------------------
@ -198,7 +201,7 @@ wxSize wxButtonBase::GetDefaultSize()
void wxButton::SetDefault()
{
FormType* form = GetParentForm();
FormType* form = (FormType* )GetParentForm();
if(form==NULL)
return;
FrmSetDefaultButtonID(form,GetId());

View File

@ -37,6 +37,8 @@
#include "wx/settings.h"
#endif
#include <Control.h>
// ============================================================================
// implementation
// ============================================================================

View File

@ -38,6 +38,9 @@
#include "wx/cmndata.h"
#include "wx/colordlg.h"
#include <UIColor.h>
#include <UIControls.h>
// ----------------------------------------------------------------------------
// wxWin macros
// ----------------------------------------------------------------------------

View File

@ -46,6 +46,10 @@
#include "wx/radiobut.h"
#include "wx/slider.h"
#include <Control.h>
#include <Form.h>
#include <StatusBar.h>
// ----------------------------------------------------------------------------
// wxWin macros
// ----------------------------------------------------------------------------
@ -78,7 +82,7 @@ wxControl::~wxControl()
DestroyChildren();
uint16_t index;
FormType* form = GetObjectFormIndex(index);
FormType* form = (FormType*)GetObjectFormIndex(index);
if(form!=NULL && index!=frmInvalidObjectId)
{
FrmRemoveObject((FormType **)&form,index);
@ -107,13 +111,13 @@ bool wxControl::Create(wxWindow *parent,
return true;
}
bool wxControl::PalmCreateControl(ControlStyleType style,
bool wxControl::PalmCreateControl(int style,
const wxString& label,
const wxPoint& pos,
const wxSize& size,
uint8_t groupID)
{
FormType* form = GetParentForm();
FormType* form = (FormType*)GetParentForm();
if(form==NULL)
return false;
@ -135,7 +139,7 @@ bool wxControl::PalmCreateControl(ControlStyleType style,
ControlType *control = CtlNewControl(
(void **)&form,
GetId(),
style,
(ControlStyleType)style,
wxEmptyString,
x,
y,
@ -162,9 +166,9 @@ bool wxControl::PalmCreateField(const wxString& label,
const wxSize& size,
bool editable,
bool underlined,
JustificationType justification)
int justification)
{
FormType* form = GetParentForm();
FormType* form = (FormType*)GetParentForm();
if(form==NULL)
return false;
@ -190,7 +194,7 @@ bool wxControl::PalmCreateField(const wxString& label,
underlined,
false,
false,
justification,
(JustificationType)justification,
false,
false,
false
@ -211,7 +215,7 @@ bool wxControl::PalmCreateField(const wxString& label,
// various accessors
// ----------------------------------------------------------------------------
FormType* wxControl::GetParentForm() const
WXFORMPTR wxControl::GetParentForm() const
{
wxWindow* parentTLW = GetParent();
while ( parentTLW && !parentTLW->IsTopLevel() )
@ -224,9 +228,9 @@ FormType* wxControl::GetParentForm() const
return tlw->GetForm();
}
FormType* wxControl::GetObjectFormIndex(uint16_t& index) const
WXFORMPTR wxControl::GetObjectFormIndex(uint16_t& index) const
{
FormType* form = GetParentForm();
FormType* form = (FormType* )GetParentForm();
if(form!=NULL)
index = FrmGetObjectIndex(form, GetId());
else
@ -237,7 +241,7 @@ FormType* wxControl::GetObjectFormIndex(uint16_t& index) const
void* wxControl::GetObjectPtr() const
{
uint16_t index;
FormType* form = GetObjectFormIndex(index);
FormType* form = (FormType*)GetObjectFormIndex(index);
if(form==NULL || index==frmInvalidObjectId)return NULL;
return FrmGetObjectPtr(form,index);
}
@ -252,7 +256,7 @@ wxBorder wxControl::GetDefaultBorder() const
void wxControl::SetIntValue(int val)
{
FormType* form = GetParentForm();
FormType* form = (FormType*)GetParentForm();
if(form==NULL)
return;
uint16_t index = FrmGetObjectIndex(form, GetId());
@ -268,7 +272,7 @@ void wxControl::SetBoolValue(bool val)
bool wxControl::GetBoolValue() const
{
FormType* form = GetParentForm();
FormType* form = (FormType*)GetParentForm();
if(form==NULL)
return false;
uint16_t index = FrmGetObjectIndex(form, GetId());
@ -282,26 +286,30 @@ wxSize wxControl::DoGetBestSize() const
return wxSize(16, 16);
}
void wxControl::DoGetBounds( RectangleType &rect ) const
void wxControl::DoGetBounds( WXRECTANGLEPTR rect ) const
{
FormType* form = GetParentForm();
if(rect==NULL)
return;
FormType* form = (FormType*)GetParentForm();
if(form==NULL)
return;
uint16_t index = FrmGetObjectIndex(form,GetId());
if(index==frmInvalidObjectId)
return;
FrmGetObjectBounds(form,index,&rect);
FrmGetObjectBounds(form,index,(RectangleType*)rect);
}
void wxControl::DoSetBounds( RectangleType &rect )
void wxControl::DoSetBounds( WXRECTANGLEPTR rect )
{
FormType* form = GetParentForm();
if(rect==NULL)
return;
FormType* form = (FormType*)GetParentForm();
if(form==NULL)
return;
uint16_t index = FrmGetObjectIndex(form,GetId());
if(index==frmInvalidObjectId)
return;
FrmSetObjectBounds(form,index,&rect);
FrmSetObjectBounds(form,index,(RectangleType*)rect);
}
void wxControl::DoGetPosition( int *x, int *y ) const
@ -310,7 +318,7 @@ void wxControl::DoGetPosition( int *x, int *y ) const
AdjustForParentClientOrigin(ox, oy);
RectangleType rect;
DoGetBounds(rect);
DoGetBounds(&rect);
if(x)
*x = rect.topLeft.x - ox;
@ -321,7 +329,7 @@ void wxControl::DoGetPosition( int *x, int *y ) const
void wxControl::DoGetSize( int *width, int *height ) const
{
RectangleType rect;
DoGetBounds(rect);
DoGetBounds(&rect);
if(width)
*width = rect.extent.x;
@ -337,7 +345,7 @@ void wxControl::DoMoveWindow(int x, int y, int width, int height)
rect.topLeft.y = y;
rect.extent.x = width;
rect.extent.y = height;
DoSetBounds(rect);
DoSetBounds(&rect);
GetParent()->Refresh(true, &area);
}
@ -367,7 +375,7 @@ bool wxControl::IsShown() const
bool wxControl::Show( bool show )
{
FormType* form = GetParentForm();
FormType* form = (FormType*)GetParentForm();
if(form==NULL)
return false;
uint16_t index = FrmGetObjectIndex(form,GetId());

View File

@ -36,6 +36,9 @@
#define _WX_DEFINE_DATE_EVENTS_
#include "wx/dateevt.h"
#include <Control.h>
#include <SelDay.h>
IMPLEMENT_DYNAMIC_CLASS(wxDatePickerCtrl, wxControl)
// ============================================================================

View File

@ -50,6 +50,11 @@
WX_DEFINE_OBJARRAY(wxMsgArray);
#endif // wxUSE_THREADS
#include <Event.h>
#include <SystemMgr.h>
#include <Menu.h>
#include <Form.h>
// ----------------------------------------------------------------------------
// helper class
// ----------------------------------------------------------------------------

View File

@ -57,6 +57,9 @@
#include "wx/univ/colschem.h"
#endif // __WXUNIVERSAL__
#include <Event.h>
#include <Form.h>
// ----------------------------------------------------------------------------
// globals
// ----------------------------------------------------------------------------
@ -211,15 +214,16 @@ bool wxFrame::HandleMenuOpen()
return true;
}
bool wxFrame::HandleMenuSelect(EventType* event)
bool wxFrame::HandleMenuSelect(WXEVENTPTR event)
{
int ItemID = event->data.menu.itemID;
const EventType *palmEvent = (EventType *)event;
const int ItemID = palmEvent->data.menu.itemID;
if (!m_frameMenuBar)
return false;
int item=m_frameMenuBar->ProcessCommand(ItemID);
if(item==-1)
const int item = m_frameMenuBar->ProcessCommand(ItemID);
if (item==-1)
return false;
wxCommandEvent commandEvent(wxEVT_COMMAND_MENU_SELECTED, item);
@ -289,7 +293,7 @@ wxPoint wxFrame::GetClientAreaOrigin() const
Y = 0;
while ( Y < maxY )
{
if(!FrmPointInTitle(GetForm(),X,Y))
if(!FrmPointInTitle((FormType*)GetForm(),X,Y))
return wxPoint(X,Y+1);
Y++;
}

View File

@ -42,6 +42,10 @@
#include "wx/ownerdrw.h"
#endif
#include <Loader.h>
#include <Form.h>
#include <Menu.h>
// ----------------------------------------------------------------------------
// global variables
// ----------------------------------------------------------------------------

View File

@ -28,6 +28,9 @@
#include "wx/msgdlg.h"
#endif
#include <Loader.h>
#include <Form.h>
IMPLEMENT_CLASS(wxMessageDialog, wxDialog)
wxMessageDialog::wxMessageDialog(wxWindow *parent,

View File

@ -29,6 +29,9 @@
#include "wx/progdlg.h"
#include "wx/msgdlg.h"
#include <Progress.h>
#include <SysEvtMgr.h>
IMPLEMENT_CLASS(wxProgressDialog, wxDialog)
static Boolean wxProgressCallback(PrgCallbackData *data)
@ -65,7 +68,7 @@ wxProgressDialog::~wxProgressDialog()
{
if(m_prgFrame)
{
PrgStopDialog(m_prgFrame, false);
PrgStopDialog((ProgressType *)m_prgFrame, false);
m_prgFrame = NULL;
}
}
@ -80,17 +83,18 @@ bool wxProgressDialog::Update(int value, const wxString& newmsg, bool *skip)
EventType event;
ProgressType *prg = (ProgressType *)m_prgFrame;
do
{
EvtGetEvent(&event, 0);
Boolean handled = PrgHandleEvent(m_prgFrame, &event);
if (!PrgHandleEvent(m_prgFrame, &event))
if( PrgUserCancel(m_prgFrame) )
Boolean handled = PrgHandleEvent(prg, &event);
if (!PrgHandleEvent(prg, &event))
if( PrgUserCancel(prg) )
return false;
}
while(event.eType != sysEventNilEvent);
PrgUpdateDialog(m_prgFrame, 0, 0, "", true);
PrgUpdateDialog(prg, 0, 0, "", true);
m_activeSkip = m_canSkip && true;
@ -106,14 +110,15 @@ bool wxProgressDialog::Show(bool show)
return false;
}
Boolean wxProgressDialog::Callback(PrgCallbackData *data)
Boolean wxProgressDialog::Callback(void *data)
{
strncpy( data->textP, m_msg.ToAscii() , data->textLen - 1 );
data->textChanged = true;
data->displaySkipBtn = m_canSkip;
data->barMaxValue = (uint32_t)m_max;
data->barCurValue = (uint32_t)m_cur;
data->delay = (m_max == m_cur);
PrgCallbackData *palmData = (PrgCallbackData *)data;
strncpy( palmData->textP, m_msg.ToAscii() , palmData->textLen - 1 );
palmData->textChanged = true;
palmData->displaySkipBtn = m_canSkip;
palmData->barMaxValue = (uint32_t)m_max;
palmData->barCurValue = (uint32_t)m_cur;
palmData->delay = (m_max == m_cur);
return true;
}

View File

@ -36,6 +36,8 @@
#include "wx/dcscreen.h"
#endif
#include <Control.h>
// ============================================================================
// wxRadioButton implementation
// ============================================================================

View File

@ -33,6 +33,8 @@
#include "wx/module.h"
#include "wx/fontutil.h"
#include <UIColor.h>
// ============================================================================
// implementation
// ============================================================================

View File

@ -30,6 +30,9 @@
#include "wx/toplevel.h"
#include <Form.h>
#include <Control.h>
#if wxUSE_EXTENDED_RTTI
WX_DEFINE_FLAGS( wxSliderStyle )
@ -123,7 +126,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
if(!wxControl::Create(parent, id, pos, size, style, validator, name))
return false;
FormType* form = GetParentForm();
FormType* form = (FormType*)GetParentForm();
if(form==NULL)
return false;
@ -324,10 +327,10 @@ bool wxSlider::SendUpdatedEvent()
return handled;
}
bool wxSlider::SendScrollEvent(EventType* event)
bool wxSlider::SendScrollEvent(WXEVENTPTR event)
{
wxEventType scrollEvent;
int newPos = ValueInvertOrNot(event->data.ctlRepeat.value);
const EventType* palmEvent = (EventType*)event;
int newPos = ValueInvertOrNot(palmEvent->data.ctlRepeat.value);
if ( newPos == m_oldPos )
{
// nothing changed since last event

View File

@ -33,6 +33,8 @@
#include "wx/log.h"
#include "wx/statusbr.h"
#include <StatusBar.h>
// ----------------------------------------------------------------------------
// macros
// ----------------------------------------------------------------------------

View File

@ -30,6 +30,8 @@
#include "wx/stattext.h"
#include <Field.h>
#if wxUSE_EXTENDED_RTTI
WX_DEFINE_FLAGS( wxStaticTextStyle )

View File

@ -37,6 +37,8 @@
#include "wx/tglbtn.h"
#include <Control.h>
// ----------------------------------------------------------------------------
// macros
// ----------------------------------------------------------------------------

View File

@ -50,6 +50,9 @@
#include "wx/slider.h"
#include "wx/datectrl.h"
#include <Window.h>
#include <Form.h>
// ----------------------------------------------------------------------------
// globals
// ----------------------------------------------------------------------------
@ -60,6 +63,8 @@ extern const wxChar *wxCanvasClassName;
// Pointer to the currently active frame for the form event handler.
wxTopLevelWindowPalm* ActiveParentFrame;
static Boolean FrameFormHandleEvent(EventType *event);
// ============================================================================
// wxTopLevelWindowPalm implementation
// ============================================================================
@ -130,9 +135,9 @@ bool wxTopLevelWindowPalm::Create(wxWindow *parent,
if(FrameForm==NULL)
return false;
FrmSetEventHandler(FrameForm,FrameFormHandleEvent);
FrmSetEventHandler((FormType *)FrameForm,FrameFormHandleEvent);
FrmSetActiveForm(FrameForm);
FrmSetActiveForm((FormType *)FrameForm);
ActiveParentFrame=this;
@ -149,10 +154,10 @@ wxTopLevelWindowPalm::~wxTopLevelWindowPalm()
WXWINHANDLE wxTopLevelWindowPalm::GetWinHandle() const
{
FormType *form = GetForm();
FormType *form = (FormType *)GetForm();
if(form)
return FrmGetWindowHandle(form);
return 0;
return NULL;
}
// ----------------------------------------------------------------------------
@ -165,7 +170,7 @@ void wxTopLevelWindowPalm::DoShowWindow(int nShowCmd)
bool wxTopLevelWindowPalm::Show(bool show)
{
FrmDrawForm(FrameForm);
FrmDrawForm((FormType *)FrameForm);
wxPaintEvent event(m_windowId);
event.SetEventObject(this);
@ -203,7 +208,7 @@ void wxTopLevelWindowPalm::Restore()
void wxTopLevelWindowPalm::DoGetSize( int *width, int *height ) const
{
RectangleType rect;
FrmGetFormBounds( GetForm() , &rect );
FrmGetFormBounds( (FormType *)GetForm() , &rect );
if(width)
*width = rect.extent.x;
if(height)
@ -236,7 +241,7 @@ bool wxTopLevelWindowPalm::EnableCloseButton(bool enable)
return false;
}
FormType *wxTopLevelWindowPalm::GetForm() const
WXFORMPTR wxTopLevelWindowPalm::GetForm() const
{
return FrmGetActiveForm();
}
@ -250,9 +255,10 @@ bool wxTopLevelWindowPalm::SetShape(const wxRegion& region)
// wxTopLevelWindow native event handling
// ----------------------------------------------------------------------------
bool wxTopLevelWindowPalm::HandleControlSelect(EventType* event)
bool wxTopLevelWindowPalm::HandleControlSelect(WXEVENTPTR event)
{
int id = event->data.ctlSelect.controlID;
const EventType *palmEvent = (EventType *)event;
const int id = palmEvent->data.ctlSelect.controlID;
wxWindow* win = FindWindowById(id,this);
if(win==NULL)
@ -297,11 +303,12 @@ bool wxTopLevelWindowPalm::HandleControlSelect(EventType* event)
return false;
}
bool wxTopLevelWindowPalm::HandleControlRepeat(EventType* event)
bool wxTopLevelWindowPalm::HandleControlRepeat(WXEVENTPTR event)
{
int id = event->data.ctlRepeat.controlID;
const EventType *palmEvent = (EventType *)event;
const int id = palmEvent->data.ctlRepeat.controlID;
wxWindow* win = FindWindowById(id,this);
wxWindow* win = FindWindowById(id, this);
if(win==NULL)
return false;
@ -314,10 +321,11 @@ bool wxTopLevelWindowPalm::HandleControlRepeat(EventType* event)
return false;
}
bool wxTopLevelWindowPalm::HandleSize(EventType* event)
bool wxTopLevelWindowPalm::HandleSize(WXEVENTPTR event)
{
wxSize newSize(event->data.winResized.newBounds.extent.x,
event->data.winResized.newBounds.extent.y);
const EventType *palmEvent = (EventType *)event;
wxSize newSize(palmEvent->data.winResized.newBounds.extent.x,
palmEvent->data.winResized.newBounds.extent.y);
wxSizeEvent eventWx(newSize,GetId());
eventWx.SetEventObject(this);
return GetEventHandler()->ProcessEvent(eventWx);
@ -341,7 +349,7 @@ void wxTopLevelWindowPalm::OnActivate(wxActivateEvent& event)
* finds a better solution, please let me know. My email address is
* wbo@freeshell.org
*/
static Boolean FrameFormHandleEvent(EventType* event)
static Boolean FrameFormHandleEvent(EventType *event)
{
// frame and tlw point to the same object but they are for convenience
// of calling proper structure withiout later dynamic typcasting

View File

@ -39,6 +39,7 @@
#include <MemoryMgr.h>
#include <DLServer.h>
#include <SoundMgr.h>
#include <SysUtils.h>
// ============================================================================
// implementation

View File

@ -39,7 +39,8 @@
#include "wx/arrstr.h"
#include "wx/volume.h"
#include "VFSMgr.h"
#include <VFSMgr.h>
#include <PalmTypesCompatibility.h>
#if wxUSE_BASE

View File

@ -85,6 +85,8 @@
#include "wx/listctrl.h"
#include "wx/window.h"
#include <Window.h>
// ---------------------------------------------------------------------------
// global variables
// ---------------------------------------------------------------------------
@ -272,13 +274,13 @@ bool wxWindowPalm::Create(wxWindow *parent,
return true;
}
FormType *wxWindowPalm::GetFormPtr()
WXFORMPTR wxWindowPalm::GetFormPtr()
{
return FrameForm;
}
void wxWindowPalm::SetFormPtr(FormType *FormPtr)
void wxWindowPalm::SetFormPtr(WXFORMPTR FormPtr)
{
FrameForm=FormPtr;
FrameForm = FormPtr;
}
// ---------------------------------------------------------------------------
@ -442,7 +444,7 @@ void wxWindowPalm::Thaw()
void wxWindowPalm::Refresh(bool eraseBack, const wxRect *rect)
{
WinHandle handle = GetWinHandle();
WinHandle handle = (WinHandle)GetWinHandle();
if(handle)
{
if(rect)