검색 결과


    아직 자원 봉사자들이 한국어로 현재 문서를 번역하지 않았습니다. 가입해서 이 문서가 번역되는 일에 함께 해 주세요!

    « Gecko Plugin API Reference « Plug-in Side Plug-in API


    Used on Mac OS only

    Contains information required by the window field of an NPWindow structure.


    typedef struct NP_Port
        CGrafPtr port;  /* Grafport */
        int32    portx; /* position inside the topmost window */
        int32    porty;
    } NP_Port;


    The data structure has the following fields:

    Standard Mac OS port into which the plug-in should draw.
    portx, porty
    Top-left corner of the plug-in rectangle in port coordinates (taking the scroll position into account).


    On Mac OS, the window field of an NPWindow structure points to an NP_Port object, which is allocated by the browser. The NP_Port is valid for the lifetime of the NPWindow, that is, until NPP_SetWindow is called again with a different value or the instance is destroyed.

    Since the port is shared between the plug-in and other plug-ins and the browser, the plug-in should always do the following:

    • Draw only within the area designated by the NPWindow.
    • Save the current port settings before changing the port for drawing.
    • Set the desired port settings before drawing.
    • Restore the previous port settings after drawing.

    See Also

    NPP_SetWindow, NPWindow

    문서 태그 및 공헌자

    Contributors to this page: Pmash
    최종 변경: Pmash,