Java 类com.sun.jna.PointerType 实例源码

项目:JNAerator    文件:JNADeclarationsConverter.java   
@Override
protected Struct createFakePointerClass(Identifier fakePointer) {
    Struct ptClass = result.declarationsConverter.publicStaticClass(fakePointer, ident(PointerType.class), Struct.Type.JavaClass, null);

    String pointerVarName = "address";
    ptClass.addDeclaration(new Function(Function.Type.JavaMethod, fakePointer, null,
            new Arg(pointerVarName, typeRef(com.sun.jna.Pointer.class))).addModifiers(ModifierType.Public).setBody(
            block(stat(methodCall("super", varRef(pointerVarName))))));
    ptClass.addDeclaration(new Function(Function.Type.JavaMethod, fakePointer, null)
            .addModifiers(ModifierType.Public)
            .setBody(
            block(stat(methodCall("super")))));
    return ptClass;
}
项目:silverflash    文件:CoreManager.java   
int sched_setaffinity(final int pid, final int cpusetsize, final PointerType cpuset)
throws LastErrorException;
项目:JNAerator    文件:StringPointer.java   
public StringPointer(PointerType p) {
    this(p.getPointer(), 0);
}
项目:JNAerator    文件:WStringPointer.java   
public WStringPointer(PointerType p) {
    this(p.getPointer(), 0);
}
项目:DigitalMediaServer    文件:CoreFoundation.java   
/**
 * Creates a CFNumber object using a specified value.
 * <p>
 * References are owned if created by functions including "Create" or "Copy"
 * and must be released with {@link #CFRelease} to avoid leaking references.
 * <p>
 * The type of number pointed to by the {@code valuePtr} is specified by
 * {@code theType}. The {@code theType} parameter is not necessarily
 * preserved when creating a new {@code CFNumber} object. The
 * {@code CFNumber} object will be created using whatever internal storage
 * type the creation function deems appropriate. Use the function
 * {@link #CFNumberGetType} to find out what type the {@code CFNumber}
 * object used to store your value.
 * <p>
 * If {@code theType} is a floating point type and the value represents one
 * of the infinities or {@code NaN}, the well-defined {@code CFNumber} for
 * that value is returned. If either of {@code valuePtr} or {@code theType}
 * is an invalid value, the result is undefined.
 *
 * @param allocator the {@code CFAllocator} to use to allocate memory for
 *            the new object. Pass {@code null} or
 *            {@link #kCFAllocatorDefault} to use the default allocator.
 * @param theType a constant that specifies the data type of the value to
 *            convert. See {@link CFNumberType} for a list of possible
 *            values.
 * @param valuePtr a {@link PointerType} to the value for the returned
 *            number object.
 * @return A new number with the value specified by {@code valuePtr}.
 *         Ownership follows the <a href=
 *         "https://developer.apple.com/library/content/documentation/CoreFoundation/Conceptual/CFMemoryMgmt/Concepts/Ownership.html#//apple_ref/doc/uid/20001148-103029"
 *         >The Create Rule</a>.
 */
CFNumberRef CFNumberCreate(CFAllocatorRef allocator, CFNumberType theType, PointerType valuePtr);
项目:floe2    文件:PosixJNAAffinity.java   
/**
 * The native set affinity function.
 * @param pid if of the process/thread.
 * @param cpusetsize size of the cpuset flag (in bytes)
 * @param cpuset the cpuset mask to be used for the process.
 * @return 0 if no error, otherwise non-zero error code.
 * @throws LastErrorException wrapper for the exception from the library
 */
int sched_setaffinity(final int pid,
                      final int cpusetsize,
                      final PointerType cpuset)
        throws LastErrorException;
项目:floe2    文件:PosixJNAAffinity.java   
/**
 * The native get affinity function.
 * @param pid if of the process/thread.
 * @param cpusetsize size of the cpuset flag (in bytes)
 * @param cpuset the cpuset mask to be used for the process.
 * @return 0 if no error, other wise a non-zero error code.
 * @throws LastErrorException wrapper for the exception from the library
 */
int sched_getaffinity(final int pid,
                      final int cpusetsize,
                      final PointerType cpuset)
        throws LastErrorException;
项目:gtk-java-bindings    文件:GtkListBoxForeachFunc.java   
/**
 * A function used by gtk_list_box_selected_foreach(). It will be called on every selected child of the box .
 *
 * @param box       a GtkListBox
 * @param row       a GtkListBoxRow
 * @param user_data user data.
 */
@Since("3.14")
void invoke(GtkListBox box, GtkListBoxRow row, PointerType user_data);
项目:gtk-java-bindings    文件:GtkIconViewForeachFunc.java   
/**
 * A function used by gtk_icon_view_selected_foreach() to map all selected rows. It will be called on every
 * selected row in the view.
 *
 * @param icon_view a GtkIconView
 * @param path      The GtkTreePath of a selected row
 * @param data      user data.
 */
void invoke(GtkIconView icon_view, GtkTreeModel path, PointerType data);
项目:gtk-java-bindings    文件:GtkListBoxSortFunc.java   
/**
 * Compare two rows to determine which should be first.
 *
 * @param row1      he first row
 * @param row2      the second row
 * @param user_data user data.
 * @return < 0 if row1 should be before row2 , 0 if they are equal and > 0 otherwise
 */
@Since("3.10")
int invoke(GtkListBoxRow row1, GtkListBoxRow row2, PointerType user_data);
项目:gtk-java-bindings    文件:GtkListBoxFilterFunc.java   
/**
 * Will be called whenever the row changes or is added and lets you control if the row should be visible or not.
 *
 * @param row       the row that may be filtered
 * @param user_data user data.
 * @return TRUE if the row should be visible, FALSE otherwise
 */
@Since("3.10")
boolean invoke(GtkListBoxRow row, PointerType user_data);
项目:gtk-java-bindings    文件:GtkFlowBoxSortFunc.java   
/**
 * A function to compare two children to determine which should come first.
 *
 * @param child1    the first child
 * @param child2    the second child
 * @param user_data user data.
 * @return < 0 if child1 should be before child2 , 0 if the are equal, and > 0 otherwise
 */
int invoke(GtkFlowBoxChild child1, GtkFlowBoxChild child2, PointerType user_data);
项目:gtk-java-bindings    文件:GtkListBoxUpdateHeaderFunc.java   
/**
 * Whenever row changes or which row is before row changes this is called, which lets you update the header on row .
 * You may remove or set a new one via gtk_list_box_row_set_header() or just change the state of the current
 * header widget.
 *
 * @param row       the row to update
 * @param before    the row before row , or NULL if it is first.
 * @param user_data user data.
 */
@Since("3.10")
void invoke(GtkListBoxRow row, GtkListBoxRow before, PointerType user_data);
项目:gtk-java-bindings    文件:GtkAssistantPageFunc.java   
/**
 * A function used by gtk_assistant_set_forward_page_func() to know which is the next page given a current one.
 * It’s called both for computing the next page when the user presses the “forward” button and for handling the
 * behavior of the “last” button.
 *
 * @param current_page The page number used to calculate the next page.
 * @param data         user data.
 * @return The next page number.
 */
int invoke(int current_page, PointerType data);
项目:gtk-java-bindings    文件:GtkFlowBoxForeachFunc.java   
/**
 * A function used by gtk_flow_box_selected_foreach(). It will be called on every selected child of the box .
 *
 * @param box       a GtkFlowBox
 * @param child     a GtkFlowBoxChild
 * @param user_data user data.
 */
void invoke(GtkFlowBox box, GtkFlowBoxChild child, PointerType user_data);
项目:gtk-java-bindings    文件:GtkListBoxCreateWidgetFunc.java   
/**
 * Called for list boxes that are bound to a GListModel with gtk_list_box_bind_model() for each item that gets
 * added to the model.
 * Versions of GTK+ prior to 3.18 called gtk_widget_show_all() on the rows created by the
 * GtkListBoxCreateWidgetFunc, but this forced all widgets inside the row to be shown,
 * and is no longer the case. Applications should be updated to show the desired row widgets.
 *
 * @param item      the item from the model for which to create a widget for.
 * @param user_data user data.
 * @return a GtkWidget that represents item .
 */
GtkWidget invoke(PointerType item, PointerType user_data);
项目:gtk-java-bindings    文件:GDestroyNotify.java   
/**
 * Specifies the type of function which is called when a data element is destroyed. It is passed the pointer to the
 * data element and should free any memory and resources allocated for it.
 *
 * @param data the data element.
 */
void invoke(PointerType data);
项目:gtk-java-bindings    文件:GtkWidgetLibrary.java   
/**
 * Gets the value of a style property of widget .
 *
 * @param widget         a GtkWidget
 * @param property_name  the name of a style property
 * @param returned_value location to return the property value
 */
void gtk_widget_style_get_property(GtkWidget widget, String property_name, PointerType returned_value);
项目:gtk-java-bindings    文件:GtkContainerLibrary.java   
/**
 * Invokes callback on each non-internal child of container .
 * See gtk_container_forall() for details on what constitutes an “internal” child.
 * For all practical purposes,
 * this function should iterate over precisely those child widgets
 * that were added to the container by the application with explicit add() calls.
 * Most applications should use gtk_container_foreach(), rather than gtk_container_forall().
 *
 * @param container     a GtkContainer
 * @param callback      a callback
 * @param callback_data callback user data
 */
void gtk_container_foreach(GtkContainer container, GtkCallback callback, PointerType callback_data);
项目:gtk-java-bindings    文件:GtkContainerLibrary.java   
/**
 * Gets the values of one or more child properties for child and container .
 *
 * @param container           a GtkContainer
 * @param child               a widget which is a child of container
 * @param first_property_name the name of the first property to get
 * @param var_args            return location for the first property,
 *                            followed optionally by more name/return location pairs,
 *                            followed by NULL
 */
void gtk_container_child_get_valist(GtkContainer container, GtkWidget child, String first_property_name, PointerType... var_args);
项目:gtk-java-bindings    文件:GtkContainerLibrary.java   
/**
 * Invokes callback on each direct child of container
 * , including children that are considered “internal” (implementation details of the container).
 * “Internal” children generally weren’t added by the user of the container,
 * but were added by the container implementation itself.
 * Most applications should use gtk_container_foreach(), rather than gtk_container_forall().
 *
 * @param container     a GtkContainer
 * @param callback      a callback.
 * @param callback_data callback user data
 */
void gtk_container_forall(GtkContainer container, GtkCallback callback, PointerType callback_data);
项目:gtk-java-bindings    文件:GtkIconViewLibrary.java   
/**
 * Converts widget coordinates to coordinates for the bin_window,
 * as expected by e.g. gtk_icon_view_get_path_at_pos().
 *
 * @param icon_view a GtkIconView
 * @param wx        X coordinate relative to the widget
 * @param wy        Y coordinate relative to the widget
 * @param bx        return location for bin_window X coordinate.
 * @param by        return location for bin_window Y coordinate.
 */
void gtk_icon_view_convert_widget_to_bin_window_coords(GtkIconView icon_view, int wx, int wy, PointerType bx, PointerType by);
项目:gtk-java-bindings    文件:GtkIconViewLibrary.java   
/**
 * Calls a function for each selected icon. Note that the model or selection cannot be modified from within this function.
 *
 * @param icon_view A GtkIconView.
 * @param func      The function to call for each selected icon.
 * @param data      User data to pass to the function.
 */
@Since("2.6")
void gtk_icon_view_selected_foreach(GtkIconView icon_view, GtkIconViewForeachFunc func, PointerType data);
项目:gtk-java-bindings    文件:GtkOffscreenWindowLibrary.java   
/**
 * Retrieves a snapshot of the contained widget in the form of a cairo_surface_t.
 * If you need to keep this around over window resizes then you should add a reference to it.
 *
 * @param offscreen the GtkOffscreenWindow contained widget.
 * @return A cairo_surface_t pointer to the offscreen surface, or NULL.
 */
PointerType gtk_offscreen_window_get_surface(GtkOffscreenWindow offscreen);
项目:gtk-java-bindings    文件:GtkAssistantLibrary.java   
/**
 * Sets the page forwarding function to be page_func .
 * This function will be used to determine what will be the next page when the user presses the forward button.
 * Setting page_func to NULL will make the assistant to use the default forward function, which just goes to
 * the next visible page.
 *
 * @param assistant a GtkAssistant
 * @param page_func the GtkAssistantPageFunc, or NULL to use the default one.
 * @param data      user data for page_func
 * @param destroy   destroy notifier for data
 */
void gtk_assistant_set_forward_page_func(GtkAssistant assistant, GtkAssistantPageFunc page_func, PointerType data, GDestroyNotify destroy);
项目:gtk-java-bindings    文件:GtkListBoxLibrary.java   
/**
 * Calls a function for each selected child.
 * Note that the selection cannot be modified from within this function.
 *
 * @param box  a GtkListBox
 * @param func the function to call for each selected child.
 * @param data user data to pass to the function
 */
@Since("3.14")
void gtk_list_box_selected_foreach(GtkListBox box, GtkListBoxForeachFunc func, PointerType data);
项目:gtk-java-bindings    文件:GtkListBoxLibrary.java   
/**
 * By setting a filter function on the box one can decide dynamically which of the rows to show.
 * For instance, to implement a search function on a list that filters the original list to only show the
 * matching rows.
 * The filter_func will be called for each row after the call, and it will continue to be called each time a
 * row changes (via gtk_list_box_row_changed()) or when gtk_list_box_invalidate_filter() is called.
 * Note that using a filter function is incompatible with using a model (see gtk_list_box_bind_model()).
 *
 * @param box         a GtkListBox
 * @param filter_func callback that lets you filter which rows to show.
 * @param user_data   user data passed to filter_func
 * @param destroy     destroy notifier for user_data
 */
@Since("3.10")
void gtk_list_box_set_filter_func(GtkListBox box, GtkListBoxFilterFunc filter_func, PointerType user_data, GDestroyNotify destroy);
项目:gtk-java-bindings    文件:GtkListBoxLibrary.java   
/**
 * By setting a header function on the box one can dynamically add headers in front of rows,
 * depending on the contents of the row and its position in the list. For instance, one could use it to add
 * headers in front of the first item of a new kind, in a list sorted by the kind.
 * The update_header can look at the current header widget using gtk_list_box_row_get_header() and either
 * update the state of the widget as needed, or set a new one using gtk_list_box_row_set_header().
 * If no header is needed, set the header to NULL.
 * Note that you may get many calls update_header to this for a particular row when e.g. changing things that
 * don’t affect the header. In this case it is important for performance to not blindly replace an existing
 * header with an identical one.
 * The update_header function will be called for each row after the call, and it will continue to be called each
 * time a row changes (via gtk_list_box_row_changed()) and when the row before changes
 * (either by gtk_list_box_row_changed() on the previous row, or when the previous row becomes a different row).
 * It is also called for all rows when gtk_list_box_invalidate_headers() is called.
 *
 * @param box           a GtkListBox
 * @param update_header callback that lets you add row headers.
 * @param user_data     user data passed to update_header
 * @param destroy       destroy notifier for user_data
 */
@Since("3.10")
void gtk_list_box_set_header_func(GtkListBox box, GtkListBoxUpdateHeaderFunc update_header, PointerType user_data, GDestroyNotify destroy);
项目:gtk-java-bindings    文件:GtkListBoxLibrary.java   
/**
 * By setting a sort function on the box one can dynamically reorder the rows of the list,
 * based on the contents of the rows.
 * The sort_func will be called for each row after the call, and will continue to be called each
 * time a row changes (via gtk_list_box_row_changed()) and when gtk_list_box_invalidate_sort() is called.
 * Note that using a sort function is incompatible with using a model (see gtk_list_box_bind_model()).
 *
 * @param box       a GtkListBox
 * @param sort_func the sort function.
 * @param user_data user data passed to sort_func
 * @param destroy   destroy notifier for user_data
 */
@Since("3.10")
void gtk_list_box_set_sort_func(GtkListBox box, GtkListBoxSortFunc sort_func, PointerType user_data, GDestroyNotify destroy);
项目:gtk-java-bindings    文件:GtkListBoxLibrary.java   
/**
 * Binds model to box .
 * If box was already bound to a model, that previous binding is destroyed.
 * The contents of box are cleared and then filled with widgets that represent items from model .
 * box is updated whenever model changes. If model is NULL, box is left empty.
 * It is undefined to add or remove widgets directly (for example, with gtk_list_box_insert()
 * or gtk_container_add()) while box is bound to a model.
 * Note that using a model is incompatible with the filtering and sorting functionality in
 * GtkListBox. When using a model, filtering and sorting should be implemented by the model.
 *
 * @param box                 a GtkListBox
 * @param model               the GListModel to be bound to box .
 * @param create_widget_func  a function that creates widgets for items or NULL in case you also passed NULL as model .
 * @param user_data           user data passed to create_widget_func
 * @param user_data_free_func function for freeing user_data
 */
@Since("3.16")
void gtk_list_box_bind_model(GtkListBox box, GListModel model, GtkListBoxCreateWidgetFunc create_widget_func, PointerType user_data, GDestroyNotify user_data_free_func);
项目:gtk-java-bindings    文件:GtkFlowBoxLibrary.java   
/**
 * Calls a function for each selected child.
 * Note that the selection cannot be modified from within this function.
 *
 * @param box  a GtkFlowBox
 * @param func a GtkFlowBoxChild
 * @param data user data.
 */
void gtk_flow_box_selected_foreach(GtkFlowBox box, GtkFlowBoxForeachFunc func, PointerType data);
项目:gtk-java-bindings    文件:GtkFlowBoxLibrary.java   
/**
 * A function that will be called whenrever a child changes or is added. It lets you control if the child should
 * be visible or not.
 *
 * @param box         a GtkFlowBox
 * @param filter_func callback that lets you filter which children to show.
 * @param user_data   user data passed to filter_func
 * @param destroy     destroy notifier for user_data
 */
void gtk_flow_box_set_filter_func(GtkFlowBox box, GtkFlowBoxFilterFunc filter_func, PointerType user_data, GDestroyNotify destroy);
项目:gtk-java-bindings    文件:GtkFlowBoxLibrary.java   
/**
 * By setting a sort function on the box , one can dynamically reorder the children of the box, based on the
 * contents of the children.
 * The sort_func will be called for each child after the call, and will continue to be called each time a child
 * changes (via gtk_flow_box_child_changed()) and when gtk_flow_box_invalidate_sort() is called.
 * Note that using a sort function is incompatible with using a model (see gtk_flow_box_bind_model()).
 *
 * @param box       a GtkFlowBox
 * @param sort_func the sort function.
 * @param user_data user data passed to sort_func
 * @param destroy   destroy notifier for user_data
 */
void gtk_flow_box_set_sort_func(GtkFlowBox box, GtkFlowBoxSortFunc sort_func, PointerType user_data, GDestroyNotify destroy);
项目:gtk-java-bindings    文件:GtkFlowBoxLibrary.java   
/**
 * Binds model to box .
 * If box was already bound to a model, that previous binding is destroyed.
 * The contents of box are cleared and then filled with widgets that represent items from model .
 * box is updated whenever model changes. If model is NULL, box is left empty.
 * It is undefined to add or remove widgets directly (for example, with gtk_flow_box_insert() or
 * gtk_container_add()) while box is bound to a model.
 * Note that using a model is incompatible with the filtering and sorting functionality in GtkFlowBox.
 * When using a model, filtering and sorting should be implemented by the model.
 *
 * @param box                 a GtkFlowBox
 * @param model               the GListModel to be bound to box .
 * @param create_widget_func  a function that creates widgets for items
 * @param user_data           user data passed to create_widget_func
 * @param user_data_free_func function for freeing user_data
 */
void gtk_flow_box_bind_model(GtkFlowBox box, GListModel model, GtkFlowBoxCreateWidgetFunc create_widget_func, PointerType user_data, GDestroyNotify user_data_free_func);
项目:virt    文件:ErrorHandler.java   
/**
 * Calls { link #processError()} if { code arg} is null.
 *
 * @param  arg  An arbitrary object returned by libvirt.
 * @return { code arg}
 * @throws LibvirtException
 */
static final <T extends PointerType> T processError(T arg) throws LibvirtException {
    if (arg == null) processError();
    return arg;
}
项目:Harmonia-1.5    文件:User32Ext.java   
/**
 *  Parameters
 *  @param - hWnd [in]
 *  Type: HWND
 *  A handle to the window.
 *  lpdwProcessId [out, optional]
 *  Type: LPDWORD
 *  A pointer to a variable that receives the process identifier. If this parameter is not NULL, GetWindowThreadProcessId copies the identifier of the process to the variable; otherwise, it does not.
 *  @return
 *  Type: DWORD
 *  The return value is the identifier of the thread that created the window.
 */
int GetWindowThreadProcessId(HWND hWnd, PointerType lpdwProcessId);
项目:Motunautr    文件:Dwmapi.java   
int DwmSetWindowAttribute(HWND hwnd, int dwAttribute, PointerType pvAttribute, int cbAttribute);
项目:HearthStats.net-Uploader    文件:User32Extra.java   
int GetWindowTextA(PointerType hWnd, byte[] lpString, int nMaxCount);
项目:gtk-java-bindings    文件:GtkFlowBoxCreateWidgetFunc.java   
GtkWidget invoke(PointerType item, PointerType user_data);
项目:gtk-java-bindings    文件:GtkFlowBoxFilterFunc.java   
boolean invoke(GtkFlowBoxChild child, PointerType user_data);