Ejemplo n.º 1
0
 * Method:    pCreate
 * Signature: (Lsun/awt/motif/MComponentPeer;)V
 */
JNIEXPORT void JNICALL Java_sun_awt_motif_MTextAreaPeer_pCreate
  (JNIEnv *env, jobject this, jobject parent) 
{
    struct TextAreaData *tdata;
#define MAX_ARGC 30
    Arg args[MAX_ARGC];
    int32_t argc;
    struct ComponentData *wdata;
    jobject target;
    Pixel bg;
    int32_t sbVisibility;
    Boolean wordWrap = False, hsb = False, vsb = False;
    jobject globalRef = awtJNI_CreateAndSetGlobalRef(env, this);
    AwtGraphicsConfigDataPtr adata;
    char *nonEmptyText = "* will never be shown *";

    AWT_LOCK();

    adata = copyGraphicsConfigToPeer(env, this);
    
    if (JNU_IsNull(env, parent)) {
        JNU_ThrowNullPointerException(env, "NullPointerException");
        AWT_UNLOCK();
        return;
    }
    wdata = (struct ComponentData *)
	JNU_GetLongFieldAsPtr(env,parent,mComponentPeerIDs.pData);
    if (wdata == NULL) {
Ejemplo n.º 2
0

/*
 * Class:     sun_awt_motif_MScrollbarPeer
 * Method:    create
 * Signature: (Lsun/awt/motif/MComponentPeer;)V
 */
JNIEXPORT void JNICALL
Java_sun_awt_motif_MScrollbarPeer_create(JNIEnv *env, jobject this,
    jobject parent)
{
    Widget w;

    jobject target;
    XtPointer globalRef = (XtPointer) /* jobject */
        awtJNI_CreateAndSetGlobalRef(env, this);

    struct ComponentData *pdata; /* for parent     */
    struct ComponentData *sdata; /* for scrollbar */
    AwtGraphicsConfigDataPtr adata;

    int32_t value, visible, minimum, maximum;
    int32_t lineIncrement, pageIncrement;
    Pixel bg;

#define MAX_ARGC 20
    Arg args[MAX_ARGC];
    int32_t argc = 0;


    AWT_LOCK();