зеркало из https://github.com/mozilla/pjs.git
r=mkaply, a=brendan OS/2 bring up - Fixes for our cursors
This commit is contained in:
Родитель
19646a0ed5
Коммит
aa22635c5e
|
@ -80,6 +80,7 @@ void nsWidgetModuleData::Init( nsIAppShell *aPrimaevalAppShell)
|
||||||
pszFontNameSize = strdup( buffer);
|
pszFontNameSize = strdup( buffer);
|
||||||
|
|
||||||
hptrSelect = hptrFrameIcon = 0;
|
hptrSelect = hptrFrameIcon = 0;
|
||||||
|
idSelect = 0;
|
||||||
|
|
||||||
// Work out if the system is DBCS
|
// Work out if the system is DBCS
|
||||||
COUNTRYCODE cc = { 0 };
|
COUNTRYCODE cc = { 0 };
|
||||||
|
@ -155,13 +156,52 @@ nsWidgetModuleData::~nsWidgetModuleData()
|
||||||
|
|
||||||
HPOINTER nsWidgetModuleData::GetPointer( nsCursor aCursor)
|
HPOINTER nsWidgetModuleData::GetPointer( nsCursor aCursor)
|
||||||
{
|
{
|
||||||
if( aCursor != eCursor_hyperlink)
|
ULONG idPtr = 0;
|
||||||
printf( "\n*** Need to implement cursor type %d (see widget/os2/nsModule.cpp)\n\n", (int) aCursor);
|
|
||||||
|
switch( aCursor)
|
||||||
|
{
|
||||||
|
case eCursor_hyperlink: idPtr = ID_PTR_SELECTURL ; break;
|
||||||
|
case eCursor_arrow_north: idPtr = ID_PTR_ARROWNORTH ; break;
|
||||||
|
case eCursor_arrow_north_plus: idPtr = ID_PTR_ARROWNORTHP; break;
|
||||||
|
case eCursor_arrow_south: idPtr = ID_PTR_ARROWSOUTH ; break;
|
||||||
|
case eCursor_arrow_south_plus: idPtr = ID_PTR_ARROWSOUTHP; break;
|
||||||
|
case eCursor_arrow_west: idPtr = ID_PTR_ARROWWEST ; break;
|
||||||
|
case eCursor_arrow_west_plus: idPtr = ID_PTR_ARROWWESTP ; break;
|
||||||
|
case eCursor_arrow_east: idPtr = ID_PTR_ARROWEAST ; break;
|
||||||
|
case eCursor_arrow_east_plus: idPtr = ID_PTR_ARROWEASTP ; break;
|
||||||
|
case eCursor_copy: idPtr = ID_PTR_COPY ; break;
|
||||||
|
case eCursor_alias: idPtr = ID_PTR_ALIAS ; break;
|
||||||
|
case eCursor_cell: idPtr = ID_PTR_CELL ; break;
|
||||||
|
case eCursor_grab: idPtr = ID_PTR_GRAB ; break;
|
||||||
|
case eCursor_grabbing: idPtr = ID_PTR_GRABBING ; break;
|
||||||
|
|
||||||
|
case eCursor_crosshair:
|
||||||
|
case eCursor_help:
|
||||||
|
case eCursor_spinning:
|
||||||
|
case eCursor_context_menu:
|
||||||
|
case eCursor_count_up:
|
||||||
|
case eCursor_count_down:
|
||||||
|
case eCursor_count_up_down:
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
NS_ASSERTION( 0, "Unknown cursor type");
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( idPtr == 0)
|
||||||
|
{
|
||||||
|
idPtr = ID_PTR_SELECTURL; // default to hyperlink cursor?
|
||||||
|
printf( "\n*** Need to implement cursor type %d (see widget/src/os2/nsModule.cpp)\n\n", (int) aCursor);
|
||||||
|
}
|
||||||
|
|
||||||
|
// Use an array and indices here since we have all the pointers in place?
|
||||||
|
if( idSelect != idPtr)
|
||||||
|
{
|
||||||
|
idSelect = idPtr;
|
||||||
|
hptrSelect = WinLoadPointer( HWND_DESKTOP, hModResources, idSelect);
|
||||||
|
}
|
||||||
|
|
||||||
// Use an array and indices here when we have all the pointers in place.
|
|
||||||
if( !hptrSelect)
|
|
||||||
hptrSelect = WinLoadPointer( HWND_DESKTOP,
|
|
||||||
hModResources, ID_PTR_SELECTURL);
|
|
||||||
return hptrSelect;
|
return hptrSelect;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,6 +88,7 @@ class nsWidgetModuleData
|
||||||
void Init( nsIAppShell *aPrimaevalAppShell);
|
void Init( nsIAppShell *aPrimaevalAppShell);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
ULONG idSelect;
|
||||||
HPOINTER hptrSelect; // !! be more sensible about this...
|
HPOINTER hptrSelect; // !! be more sensible about this...
|
||||||
HPOINTER hptrFrameIcon;
|
HPOINTER hptrFrameIcon;
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -503,7 +503,7 @@ MRESULT EXPENTRY fnwpNSWindow( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
||||||
|
|
||||||
// check to see if we have a rollup listener registered
|
// check to see if we have a rollup listener registered
|
||||||
if (nsnull != gRollupListener && nsnull != gRollupWidget) {
|
if (nsnull != gRollupListener && nsnull != gRollupWidget) {
|
||||||
if (msg == WM_ACTIVATE || msg == WM_BUTTON1DOWN ||
|
if (msg == WM_ACTIVATE || msg == WM_BUTTON1DOWN ||
|
||||||
msg == WM_BUTTON2DOWN || msg == WM_BUTTON3DOWN) {
|
msg == WM_BUTTON2DOWN || msg == WM_BUTTON3DOWN) {
|
||||||
// Rollup if the event is outside the popup
|
// Rollup if the event is outside the popup
|
||||||
if (PR_FALSE == nsWindow::EventIsInsideWindow((nsWindow*)gRollupWidget)) {
|
if (PR_FALSE == nsWindow::EventIsInsideWindow((nsWindow*)gRollupWidget)) {
|
||||||
|
@ -511,12 +511,17 @@ MRESULT EXPENTRY fnwpNSWindow( HWND hwnd, ULONG msg, MPARAM mp1, MPARAM mp2)
|
||||||
|
|
||||||
// if we are supposed to be consuming events and it is
|
// if we are supposed to be consuming events and it is
|
||||||
// a Mouse Button down, let it go through
|
// a Mouse Button down, let it go through
|
||||||
if (gRollupConsumeRollupEvent && msg != WM_BUTTON1DOWN) {
|
// if (gRollupConsumeRollupEvent && msg != WM_BUTTON1DOWN) {
|
||||||
// return FALSE;
|
// return FALSE;
|
||||||
}
|
// }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
else if (msg == WM_SETFOCUS) {
|
||||||
|
if (!mp2 && hwnd != WinQueryWindow((HWND)mp1, QW_OWNER)) {
|
||||||
|
gRollupListener->Rollup();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// Messages which get re-routed if their source was an nsWindow
|
// Messages which get re-routed if their source was an nsWindow
|
||||||
// (it's very bad to reroute messages whose source isn't an nsWindow,
|
// (it's very bad to reroute messages whose source isn't an nsWindow,
|
||||||
|
|
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичный файл не отображается.
Двоичные данные
widget/src/os2/res/select.ptr
Двоичные данные
widget/src/os2/res/select.ptr
Двоичный файл не отображается.
|
@ -46,7 +46,20 @@ ICON ID_ICO_FOLDER folder.ico
|
||||||
ICON ID_ICO_DRAGITEM dragitem.ico
|
ICON ID_ICO_DRAGITEM dragitem.ico
|
||||||
|
|
||||||
/* pointers */
|
/* pointers */
|
||||||
POINTER ID_PTR_SELECTURL select.ptr
|
POINTER ID_PTR_SELECTURL select.ptr
|
||||||
|
POINTER ID_PTR_ARROWNORTH arrow_north.ptr
|
||||||
|
POINTER ID_PTR_ARROWNORTHP arrow_north_plus.ptr
|
||||||
|
POINTER ID_PTR_ARROWSOUTH arrow_south.ptr
|
||||||
|
POINTER ID_PTR_ARROWSOUTHP arrow_south_plus.ptr
|
||||||
|
POINTER ID_PTR_ARROWWEST arrow_west.ptr
|
||||||
|
POINTER ID_PTR_ARROWWESTP arrow_west_plus.ptr
|
||||||
|
POINTER ID_PTR_ARROWEAST arrow_east.ptr
|
||||||
|
POINTER ID_PTR_ARROWEASTP arrow_east_plus.ptr
|
||||||
|
POINTER ID_PTR_COPY copy.ptr
|
||||||
|
POINTER ID_PTR_ALIAS aliasb.ptr
|
||||||
|
POINTER ID_PTR_CELL cell.ptr
|
||||||
|
POINTER ID_PTR_GRAB grab.ptr
|
||||||
|
POINTER ID_PTR_GRABBING grabbing.ptr
|
||||||
|
|
||||||
/* stringtable */
|
/* stringtable */
|
||||||
STRINGTABLE
|
STRINGTABLE
|
||||||
|
|
|
@ -33,15 +33,28 @@
|
||||||
#define IDD_HELPBUTTON 104
|
#define IDD_HELPBUTTON 104
|
||||||
|
|
||||||
// Icons
|
// Icons
|
||||||
#define ID_ICO_FRAME 500
|
#define ID_ICO_FRAME 500
|
||||||
#define ID_ICO_FOLDER 501
|
#define ID_ICO_FOLDER 501
|
||||||
#define ID_ICO_DRAGITEM 502
|
#define ID_ICO_DRAGITEM 502
|
||||||
|
|
||||||
#define ID_PTR_SELECTURL 2000
|
#define ID_PTR_SELECTURL 2000
|
||||||
|
#define ID_PTR_ARROWNORTH 2001
|
||||||
|
#define ID_PTR_ARROWNORTHP 2002
|
||||||
|
#define ID_PTR_ARROWSOUTH 2003
|
||||||
|
#define ID_PTR_ARROWSOUTHP 2004
|
||||||
|
#define ID_PTR_ARROWWEST 2005
|
||||||
|
#define ID_PTR_ARROWWESTP 2006
|
||||||
|
#define ID_PTR_ARROWEAST 2007
|
||||||
|
#define ID_PTR_ARROWEASTP 2008
|
||||||
|
#define ID_PTR_COPY 2009
|
||||||
|
#define ID_PTR_ALIAS 2010
|
||||||
|
#define ID_PTR_CELL 2011
|
||||||
|
#define ID_PTR_GRAB 2012
|
||||||
|
#define ID_PTR_GRABBING 2013
|
||||||
|
|
||||||
#define ID_STR_FONT 10000
|
#define ID_STR_FONT 10000
|
||||||
#define ID_STR_HMMDIR 10001
|
#define ID_STR_HMMDIR 10001
|
||||||
#define ID_STR_NOCDIR 10002
|
#define ID_STR_NOCDIR 10002
|
||||||
|
|
||||||
// OS2TODO HCT temporary bug fix
|
// OS2TODO HCT temporary bug fix
|
||||||
#ifndef FCF_CLOSEBUTTON // defined in the Merlin toolkit
|
#ifndef FCF_CLOSEBUTTON // defined in the Merlin toolkit
|
||||||
|
|
Загрузка…
Ссылка в новой задаче