Differences between version dated 2003-07-01 23:53:57 and 2003-08-01 11:49:42
(spanning 3 versions)
Deletions are marked like this.
Additions are marked like this.
[[TableOfContents]]
----
==== 2002³â 11¿ù ====
delete ±¸¹®À» {{{MemPtrFree()}}} ÇÔ¼ö·Î ¹Ù²Û °Í¸¸À¸·Î ¹ö±× ¼Ò¸ê. &[...&]
delete ±¸¹®À» {{|MemPtrFree()|}} ÇÔ¼ö·Î ¹Ù²Û °Í¸¸À¸·Î ¹ö±× ¼Ò¸ê. &[...&]
Àú¼öÁØÀÇ Èû. ³î¶øµµ´Ù...
Lightweight C++ Framework for PalmOS(ÀÌÇÏ FW)¿¡¼´Â Æû ÄÁÆ®·Ñ¿¡ ´ëÇØ Wrapper Ŭ·¡½º¸¦ Á¦°øÇÏ°í ÀÖ´Ù : List, Field Ŭ·¡½º°¡ Á¦°øµÇ¸ç, (ÀÌ µÎ ÄÁÆ®·ÑÀÇ ÀÌ¿ëÀÌ °¡Àå ³ÇØÇϱ⠶§¹®ÀÎ µí) WidgetÀ̶ó´Â »óÀ§ Ŭ·¡½º¸¦ °®´Â´Ù.
ÇÏÁö¸¸, List, Field ÄÁÆ®·Ñ ÀÌ¿ÜÀÇ °Íµéµµ »ç¿ëÇÒ ¼ö ÀÖµµ·Ï Form Ŭ·¡½º¿¡¼ Áö¿øÇÏ°í ÀÖ´Ù. ´ÙÀ½°ú °°Àº ¹æ¹ýÀ¸·Î »ç¿ëÇÑ´Ù :
// ÀÌ·± ÆûÀÌ Á¸ÀçÇÒ ¶§..
AgentEditForm *f = (AgentEditForm*)(Application::Instance())->GetForm(AgentEditFormForm);
f->SetCheckBox(AgentEditFormUseEncryptionCheckbox, True);
±× ¿Ü¿¡µµ HideControl(), ShowControl(), IsCheckBoxSet(), DrawControl(), SetControlLabel() µîÀÌ ÀÖ´Ù.
==== 2002³â 10¿ù ====
Graham WheelerÀÇ °æ·® C++ ÇÁ·¹ÀÓ¿öÅ© for ÆÊOS¸¦ »ç¿ëÇÏ·Á ³ë·ÂÁß.
(http://www.bradygirl.com/PalmFW/index.html Âü°íURL)
ȸ鿡 ¹º°¡¸¦ ±×¸®´Â ÇÔ¼öÀÇ °æ¿ì¿¡´Â, ¿¹Àü ÀÏ¹Ý API¸¦ »ç¿ëÇϸé ÀúÇØ»óµµ ¸ðµå¿¡ ¸ÂÃç¼ ±×·ÁÁø´Ù. (ȤÀº, ¿¡·¯°¡ ³´Ù)
ÇØ°á¹æ¹ý ;
ÀúÇØ»óµµ ºñÆ®¸ÊÀÇ ¼Ò½º µ¥ÀÌÅ͸¦ ÇöÀç Æû À©µµ¿ì¿¡(ºñÆ®¸Ê ¼Ò½ºÀÇ ÁÖ¼Ò°ªÀ» ¾Ë¾Æ³»¼) Ä¥Çعö¸°´Ù.
¹®Á¦ÀÇ ¼ÒÁö°¡ ÀÖ´Â °ÍÀ¸·Î º¸ÀÌÁö¸¸, ¾ÆÁ÷±îÁö´Â Á¤»óÀûÀ¸·Î-°ÑÀ¸·Î º¸±â¿¡´Â-µ¿ÀÛÇÏ°í ÀÖ´Ù.
==== 2002³â 8¿ù ====
BMP »ý¼º ¹× °¡»ó À©µµ¿ì¿¡¼ ³»¿ë ¿Å±â±â
WinHandle hWndScreen,oldDrawWinH;
UInt16 error;
BmpType* pBmpScreen
delete pBmpScreen;
pBmpScreen = NULL;
}
---
ÇöÀç ±â±âÀÇ »ç¿ëÀÚÀ̸§ ¾Ë¾Æ³»±â(HotSync½Ã ½Äº°¿ëµµ·Îµµ »ç¿ë)
DlkGetSyncInfo (NULL, NULL, NULL, szUserName, NULL, NULL);
----
¸ð´ÞÆû Á¦´ë·Î »ç¿ëÇϱâ
FormPtr previousForm = FrmGetActiveForm();
FormPtr frm = FrmInitForm(ID_PASSWORD);
UInt16 hitButton;
FrmDeleteForm(frm);
return (hitButton == ID_PASSWORD_OK);
----
ÄÁÆ®·ÑÀ» Æû¿¡¼ °¨Ãß±â/º¸¿©ÁÖ±â
FrmHideObject(frmP,FrmGetObjectIndex(frmP,PreferencesNamingPortField));
FrmShowObject(frmP,FrmGetObjectIndex(frmP,PreferencesNamingPortField));
¸î°¡Áö ¹æ¹ýÀÌ ´õ ÀÖÀ» ¼ö ÀÖÀ¸³ª, ¾î¶² ÄÁÆ®·Ñ¿¡µµ Àû¿ëÇÒ ¼ö ÀÖ´Ù´Â Á¡¿¡¼ ÁÁ´Ù.
PopTrigger¸¦ Ŭ¸¯Çؼ ´Ù¸¥ Çʵ带 ¼±ÅÃÇصµ, LabelÀÇ ³»¿ëÀÌ ÀÚµ¿À¸·Î ¹Ù²îÁö ¾ÊÀ¸¹Ç·Î ¹Ù²Ù´Â Äڵ带 ³Ö¾îÁà¾ß ÇÑ´Ù. popSelectEvent¸¦ ¹ÞÀÚ.
¸ð´Þ ÆûÀ» ¸ð´Þ¸®½ºÃ³·³ »ç¿ëÇϱâ
¸Þ´º, ȤÀº ¹öÆ°ÀÌ Å¬¸¯µÇ¾úÀ» ¶§ FrmGotoForm(FORM_ID)·Î ÆûÀ¸·Î À̵¿
AppHandleEvent¿¡¼ frmLoadEvent°¡ ¹ß»ýÇÏ°Ô µÇ¹Ç·Î, FrmInitForm, FrmSetActiveFormÀ» È£ÃâÇÑ´Ù.
FrmSetEventHandler(frmP, PreferencesFormHandleEvent); ·Î ÇØ´ç Æû¿¡ À̺¥Æ® Çڵ鷯¸¦ ÇÒ´ç.
±×·± ´ÙÀ½ ƯÁ¤ ¹öÆ°ÀÇ À̺¥Æ®¿¡ FrmGotoForm(MainForm)¸¦ ÇÒ´çÇÏ°í, frmCloseEvent½Ã FrmEraseForm(frmP); FrmDeleteForm(frmP);¸¦ È£Ãâ.
ÀÌ·¯¸é ¸Þ¸ð¸®ÀÇ ³¶ºñ¾øÀÌ(¹°·Ð ¸ÞÀÎÆûÀº °è¼Ó ¸Þ¸ð¸®¿¡ ³²¾Æ ÀÖÁö¸¸..) ´Ù¸¥ ÆûÀ» È£ÃâÇß´Ù°¡ Áö¿ï ¼ö ÀÖ´Ù.
¹°·Ð ¹öÆ°ÀÌ OK/Cancel»ÓÀ϶§´Â ±×³É FrmDoDialog()¸¦ ¾²´Â°Ô ÁÁ´Ù.
Çʵ忡 °ª ½Ø·Á³Ö±â ÃÖÁ¾ÆÇ
FieldType* field;
Char* dest;
Char tempNum[5];
strcpy(dest, tempNum);
MemHandleUnlock(handle);
FldSetTextHandle(field,handle);
À§¿Í °°ÀÌ ÇÑ ´ÙÀ½, frmCloseEvent¸¦ ¹ÞÀ» ¶§ °¢ Çʵ忡 FldFreeMemory()¸¦ È£ÃâÇÑ´Ù :
FieldType *pField;
GetObjectPtr(pField, PreferencesNamingPortField);
FldFreeMemory(pField);
----
sleep()Àº ÃÊ´ÜÀ§´Ù. ms°¡ ¾Æ´Ï´Ù. &[...&]
----
ÇԺηΠ¸®¼Ò½º À§Ä¡¸¦ ¹Ù²ÙÁö ¸»Áö¾î´Ù...
if (eventP->eType == frmLoadEvent)
{
// Load the form resource.
if (frmP == 0)
frmP = FrmInitForm(formId);
FrmSetActiveForm(frmP);
À§ ÄÚµå´Â ÆûÀ» ·ÎµåÇÒ ¶§ ¾²´Â °ÍÀε¥, ÀÌÀ¯¾øÀÌ FrmInitForm¿¡¼ NULL HandleÀ̶õ ¿¡·¯°¡ »¶»¶ ³ª¸é Ʋ¸²¾øÀÌ ¸®¼Ò½º¸¦ Á¦´ë·Î ÀоîµéÀÌÁö ¸øÇÏ´Â °ÍÀ̹ǷÎ... ¸®¼Ò½º Çì´õ ÆÄÀÏÀÇ À§Ä¡°¡ Rsc Æú´õ¿¡ ÀÖ´ÂÁö È®ÀÎÇÏ°í, ÇÁ·ÎÁ§Æ®¿¡ Æ÷ÇÔµÈ rsrc ÆÄÀÏÀÇ °æ·Îµµ È®ÀÎÇغ»´Ù. (È÷µçÆú´õ ¾È¿¡ ÀÖ´Â°Ô ¿¬°áµÇ¾î ÀÖÀ¸¸é Á¶¶©°Å½Ã´Ù)
----
==== 2002³â 7¿ù ====
Á¤ÀÇ´Â ½Â¸®ÇÑ´Ù. [CXStreamBuffer ¿Ï¼º]
¾Æ·¡ ¹®Àå... ÀǵµÇÑ´ë·Î µÉ±î ¾ÈµÉ±î? ±í°Ô »ý°¢ÇغÁ¶ó. Æ÷ÀÎÅ͵µ °á±¹Àº º¯¼ö´Ù.
MoveNext(pNode);
...
void MoveNext(Node *pNode)
{ pNode = pNode->m_pNext; }
----
»ðÁú¿¡ »ðÁúÀÇ ¿¬¼Ó.
PalmOS¿¡¼ ¸Þ¸ð¸®´Â chunk¶ó´Â ´ÜÀ§·Î ÇÒ´ç¹Þ°Ô µÇ´Âµ¥, ÀÌ´Â Movable, ȤÀº Non-Movable·Î ³ª´µ°Ô µÈ´Ù.
¶ÇÇÑ, ÇÒ´ç¹ÞÀº chunk´Â lockÀ» °É¾î¾ß »ç¿ëÀÌ °¡´ÉÇÏ°í, unlockÀ¸·Î ÇØÁ¦ÇØ ÁÖ¾î¾ß
³ªÁß¿¡ free·Î chunk¸¦ OS¿¡ µÇµ¹·Á ÁÙ ¼ö ÀÖ°Ô µÈ´Ù.
Handle handle;
// 10¹ÙÀÌÆ® Å©±âÀÇ Movable chunk(=heap)ÀÇ ÇÚµéÀ» ¹ÝȯÇÑ´Ù.
handle = MemHandleNew(10); Char* szTemp;
MemPtrUnlock(szTemp);
// ¸Þ¸ð¸® ÇÚµéÀ» ¹«È¿ÈÇÏ°í ÇØ´ç chunk¸¦ OS¿¡ ¹ÝȯÇÑ´Ù. MemPtrFree(szTemp)µµ °¡´ÉÇÒ±î?... ÇغÁ¶ó.
MemHandleFree(Handle);
----
¾Æ·¡ÀÇ Äڵ忡¼ Under-locked ¿¡·¯ ÇØ°áÁß. (¿¡¹Ä¿¡¼´Â Á¤»ó ÀÛµ¿ÇÔ...)
-> POSE¿¡¼ ¿¡·¯ Çڵ鸵 ¿É¼ÇÀÌ ÄÑÁ®ÀÖ´ÂÁö Ç×»ó È®ÀÎ. È®ÀÎ. Á¤»ó ÀÛµ¿Çϱä. °³»ÔÀ̳ª -_-
////////////////////////////////////
//¼öÁ¤ ¹öÀü
if(strlen(buffer) > 0)
MemHandleFree(oldHandle);
}
}
----
==== 2002³â 6¿ù ====
////////////////////////////////////////////
// ¸Þ¸ð¸® ´©Ãâ ¾øÀÌ Çʵ忡 Ãâ·ÂÇÏ´Â ·çƾ
Int16 nBufferLen;
nBufferLen = Receive(buffer,1024);
//////////////////////////////////////
MemHandleFree(oldHandle);
}
}
----
ProcessEvent()ÀÇ ÀÛ¼º ¿Ï·á. select()¸¦ ÀÌ¿ëÇÑ ExceptionÀº 󸮵ÇÁö ¾ÊÀ½. (PalmOS¿¡¼ Áö¿øÇÏÁö ¾ÊÀ½)
´ë½Å °í·ÁÇØ¾ß ÇÒ Á¡Àº, ³×Æ®¿÷ °ü·Ã Àü¿ª º¯¼ö¸¦ ¹Ì¸® ¼±¾ðÇØ¾ß ÇÑ´Ù.
¼±¾ðÇؾßÇÒ Àü¿ª º¯¼ö´Â ´ÙÀ½°ú °°´Ù. (°³¹ß¹®¼³ª À§ Çì´õ ÆÄÀÏÀ» ÂüÁ¶)
// Àü¿ª º¯¼ö
Err errno;
Int32 AppNetTimeout;
Char AppINETString&[16&];
NetHostInfoBufType AppHostInfo;
NetServInfoBufType AppServInfo;
UInt16 AppNetRefnum;
Err h_errno;
p.s:ÇöÀç ¸¸µé°í ÀÖ´Â {{{CXPalmSocket}}} Ŭ·¡½º´Â Berkeley Socket API¸¦ »ç¿ëÇÑ Å¿¿¡,
p.s:ÇöÀç ¸¸µé°í ÀÖ´Â {{|CXPalmSocket|}} Ŭ·¡½º´Â Berkeley Socket API¸¦ »ç¿ëÇÑ Å¿¿¡,
Àü¿ª º¯¼ö¸¦ »ç¿ëÇÏ°í ÀÖ´Ù.
Àü¿ª º¯¼ö¸¦ »ç¿ëÇÏÁö ¾ÊÀ¸¸é Ŭ·¡½º ¸â¹ö º¯¼ö·Î ¹À» ¼öµµ ÀÖÀ» °Í °°Àºµ¥.. °ð ¼öÁ¤ÇÒ ¿¹Á¤.
³×Æ®¿÷ °ü·Ã(Berkeley Socket API) : Palm OS Companion2.pds p.144 Âü°í
----
EvtGetEvent(&e, eventTimeout); // Å¥¿¡ Á¸ÀçÇÏ´Â ´ÙÀ½ À̺¥Æ®¸¦ °¡Á®¿Â´Ù.
// we capture the DateBook and PhoneBook keys to emulate
if (!ApplicationHandleEvent (&e))
FrmDispatchEvent (&e);
}
À§¿Í °°Àº Äڵ带 »ç¿ëÇÔÀ¸·Î½á DateBook, PhoneBook ¹öÆ° µîÀ» ´·¶À» ¶§ ÇÁ·Î±×·¥À¸·Î À̺¥Æ®¸¦ µ¹¸± ¼ö ÀÖ´Ù.
¿ø·¡ À̺¥Æ®´Â ´ÙÀ½°ú °°ÀÌ Ã³¸®µÈ´Ù :
if (!SysHandleEvent (&e))
if (!MenuHandleEvent (NULL, &e, &err))
if (!ApplicationHandleEvent (&e))
FrmDispatchEvent (&e);
FD_ZERO, FD_SET ¸ÅÅ©·ÎÀÇ ¿ëµµ´Â?
ÇöÀç Ç¥½ÃÁßÀΠȸéÀ» ³ªÅ¸³»´Â ±¸Á¶Ã¼ :
/* defines boudaries of the Pilot viewport */
typedef struct {
rfbRectangle desktop; // Dimensions of unscaled desktop
actually written. Consequently, the caller should be prepared to
call this routine repeatedly until the desired number of bytes have
been written, or until it returns 0 or -1.
----
void FrmSetEventHandler (FormType *formP, FormEventHandlerType *handler)
ÆûÀÌ ¿©·¯°³ÀÏ ¶§¿¡ À̺¥Æ® ÇÚµéÀ» ÇÒ´çÇÏ´Â ¹æ½Ä ;
(EventLoop() ¿¡¼) ApplicationHandleEvent(EventPtr)À» È£ÃâÇÑ µÚ,
if (e->eType == frmLoadEvent)
{
formId = e->data.frmLoad.formID;
FrmSetEventHandler(frm, MainFormHandleEvent);
break;
...
À§¿Í °°Àº ±¸¹®À¸·Î ÇöÀç ·ÎµåµÈ ÆûÀ» ½Äº°(frmLoadEvent), Æû¿¡ ´ëÇÑ À̺¥Æ® Çڵ鷯 Äݹé ÇÔ¼ö
MainFormHandleEvent¸¦ ÇÒ´çÇÑ´Ù. ¸¸¾à ³Ñ°Ü¹ÞÀº formID°¡ ¸í½ÃµÈ °ÍÀÌ ¾Æ´Ò °æ¿ì(frmOpenEvent,
frmLoadEvent¸¦ »ç¿ëÇÏ´Â °æ¿ì µî..) frmDispatchEvent·Î À̺¥Æ®¸¦ ÇöÀç ÆûÀÇ À̺¥Æ® Çڵ鷯¿¡
SysLibFind ; ½Ã½ºÅÛ¿¡ ÀÌ¹Ì ·ÎµåµÇ¾î ÀÖ´Â ¶óÀ̺귯¸®¸¦ ãÀ½. ´ëºÎºÐÀÇ ¶óÀ̺귯¸®(NetLib,Serial,IR)Àº
¸®¼ÂµÇ¸é ÀÚµ¿À¸·Î ·ÎµåµÇ±â ¶§¹®¿¡, ±âŸ ¶óÀ̺귯¸®´Â SysLibLoad¸¦ »ç¿ëÇؼ ·ÎµåÇÑ ÈÄ »ç¿ëÇÑ´Ù.
typedef struct RectangleType {
PointType topLeft;
PointType extent;
} RectangleType;
; CRect¿Í ºñ½ÁÇϳª extent.x/y ·Î width/heightÀ» ³ªÅ¸³»´Â°Ô ´Ù¸£´Ù.
DmOpenRef DmOpenDatabaseByTypeCreator(UInt32 type, UInt32 creator, UInt16 mode)
ShowText
of this page
EditText
of this page
FindPage
by browsing, searching, or an index
Or try one of these actions:
DeletePage,
DeleteUploadedFile,
LikePages,
SpellCheck,
UploadFile