本文整理匯總了Java中com.sun.jna.PointerType類的典型用法代碼示例。如果您正苦於以下問題:Java PointerType類的具體用法?Java PointerType怎麽用?Java PointerType使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。
PointerType類屬於com.sun.jna包,在下文中一共展示了PointerType類的15個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createFakePointerClass
import com.sun.jna.PointerType; //導入依賴的package包/類
@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;
}
示例2: sched_setaffinity
import com.sun.jna.PointerType; //導入依賴的package包/類
int sched_setaffinity(final int pid, final int cpusetsize, final PointerType cpuset)
throws LastErrorException;
示例3: StringPointer
import com.sun.jna.PointerType; //導入依賴的package包/類
public StringPointer(PointerType p) {
this(p.getPointer(), 0);
}
示例4: WStringPointer
import com.sun.jna.PointerType; //導入依賴的package包/類
public WStringPointer(PointerType p) {
this(p.getPointer(), 0);
}
示例5: CFNumberCreate
import com.sun.jna.PointerType; //導入依賴的package包/類
/**
* 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);
示例6: sched_setaffinity
import com.sun.jna.PointerType; //導入依賴的package包/類
/**
* 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;
示例7: sched_getaffinity
import com.sun.jna.PointerType; //導入依賴的package包/類
/**
* 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;
示例8: invoke
import com.sun.jna.PointerType; //導入依賴的package包/類
/**
* 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);
示例9: invoke
import com.sun.jna.PointerType; //導入依賴的package包/類
/**
* 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);
示例10: invoke
import com.sun.jna.PointerType; //導入依賴的package包/類
/**
* 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);
示例11: invoke
import com.sun.jna.PointerType; //導入依賴的package包/類
/**
* 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);
示例12: invoke
import com.sun.jna.PointerType; //導入依賴的package包/類
/**
* 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);
示例13: invoke
import com.sun.jna.PointerType; //導入依賴的package包/類
/**
* 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);
示例14: invoke
import com.sun.jna.PointerType; //導入依賴的package包/類
/**
* 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);
示例15: invoke
import com.sun.jna.PointerType; //導入依賴的package包/類
/**
* 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);