Logo Search packages:      
Sourcecode: rgtk version File versions  Download package

GdkManual.c

#include <gdk/gdk.h>

#include "gtkUtils.h"

USER_OBJECT_
S_gdk_window_get_size ( USER_OBJECT_ s_window)
{
    GdkWindow * window = ( GdkWindow * ) getPtrValue( s_window ) ;
    int width, height;
    USER_OBJECT_ ans, names;

    gdk_window_get_size (  window, & width, & height );

    PROTECT(ans = NEW_INTEGER(2));
    INTEGER_DATA(ans)[0] = width;
    INTEGER_DATA(ans)[1] = height;

    PROTECT(names = NEW_CHARACTER(2));
      SET_STRING_ELT(names, 0, COPY_TO_USER_STRING("width"));
      SET_STRING_ELT(names, 1, COPY_TO_USER_STRING("height"));
      SET_NAMES(ans, names);

    UNPROTECT(2);
    return(ans);
}



USER_OBJECT_
S_getGdkEventButtonX(USER_OBJECT_ s_obj)
{
  
    GdkEventButton *obj = ( GdkEventButton * ) getPtrValue(s_obj) ;
    USER_OBJECT_ _ans;

    _ans = asRNumeric(obj->x);

    return(_ans);
}


Generated by  Doxygen 1.6.0   Back to index