Mac光标文件夹

时间:2012-07-19 04:10:59

标签: macos

我现在已经研究了几个小时了,我想找到我的Mac系统默认光标。没有任何鼠标悬停,我只想要默认光标。我正在运行其中一个旧版本的Mac,即:10.4.11;

我被告知游标在这里:

/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HiServices.framework/Versions/A/Resources/cursors

但是,

中似乎没有Cursors文件夹
/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HiServices.framework/Versions/A/Resources/  

请帮忙。我想要一个平滑的。 :P

3 个答案:

答案 0 :(得分:6)

当系统的其余部分可能不可用时(例如在启动时),需要显示默认箭头,因此它可能存储在特殊位置,例如硬件本身。

与默认光标最近的图像可能是“上下文菜单”,此处为:

/System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/Resources/cursors/contextualmenu/cursor_1only_.png

通过一些小的编辑,您可以将此图像转换为整个箭头图片。

大多数其他游标在WebKit中都有图像,这里:

/System/Library/Frameworks/WebKit.framework/Versions/Current/Frameworks/WebCore.framework/Resources/

答案 1 :(得分:4)

经过一番挖掘后,我发现了这个:

/System/Library/PrivateFrameworks/EFILogin.framework/Versions/A/Resources/EFIResourceBuilder.bundle/Contents/Resources/loginui_cursor@2x.png

希望这就是你要找的东西。

答案 2 :(得分:1)

您可以以编程方式提取图像:

#include <stdio.h>
#include <stdlib.h>

/* Stack has three properties. capacity stands for the maximum number of  elements stack can hold.
    top stands for the current size of the stack and array is the array of elements */
typedef struct Stack
{
    int capacity;
    int top;
    int *array;
}stack;


stack* CreateStack(int);
void StackDestroy(stack*);

int StackIsEmpty(stack*);
int StackIsFull(stack*);

void StackPush(stack*, int);
int StackPop(stack*);

void Display(stack*);
void StackSearch(stack*, int);

int StackTop(stack*);
int StackSize(stack*);


/* CreateStack function takes as argument the maximum number of elements the stack can hold, creates
  a stack according to it and returns a pointer to the stack. */
stack* CreateStack(int maxSize)
{
    /* Create a stack*/
    stack *s;
    s = (stack*) malloc(sizeof(stack));

    /* Initialize it's properties*/
    s->array = (int*) malloc(sizeof(int) * maxSize);

    s->capacity = maxSize;
    s->top = -1;

    return s;
}


/* StackDestroy function will destroy the stack after the function is   called. */
void StackDestroy(stack *s)
{
    free(s->array);

    s->array = NULL;
    s->capacity = 0;
    s->top = -1;

    printf("Stack is destroyed.\n");
}


int StackIsEmpty(stack *s)
{
    return s->top < 0;
}


int StackIsFull(stack *s)
{
    return (s->top == s->capacity-1);
}


void StackPush(stack *s, int data)
{
    if(StackIsFull(s))
    {
        printf("Cannot push, stack overflow.\n");
    }
    else
    {
        s->array[++s->top] = data;
    }
}


int StackPop(stack *s)
{
    if(StackIsEmpty(s))
    {
        printf("Cannot pop, stack is empty\n");
    }
    else
    {
        return (s->array[s->top--]);
    }
}


void Display(stack *s)
{
    int i;

    if(StackIsEmpty(s))
        printf("Stack Is Empty\n");

    else{

        printf("___STACK___\n");

        for(i = s->top ; i >= 0 ; i--){
            printf("%3d: %d\n", i, s->array[i]);
        }
    }
}


void StackSearch(stack *s, int data)
{
    int i, j;
    int counter = 0;

    if(StackIsEmpty(s)){
        printf("Stack Is Empty\n");
    }
    else
    {
        for(i = s->top, j = 1 ; i >= 0 ; i--, j++)
        {
            if(data == s->array[i])
            {
                counter++;
                printf("Element %d found at position %d\n", data, j);
            }
        }

        if(counter == 0)
            printf("Element not found in stack\n");
    }
    printf("\n");
}


int StackTop(stack *s)
{
    return s->array[s->top];
}


int StackSize(stack *s)
{
    return s->top;
}

int main() {
    int choice, item, size;

    printf("Enter size of stack: ");
    scanf("%d", &size);
    stack *s = CreateStack(size);

    printf("Implementation of Stack\n");
    do
    {
        printf("\nMain Menu");
        printf("\n1.Push \n2.Pop \n3.Search \n4.Display \n5.Stack Top \n6.Stack Size \n7.Destroy Stack \n8.exit");
        printf("\nEnter Your Choice: ");
        scanf("%d", &choice);

        switch (choice)
        {
            case 1:
                printf("\nEnter The element to be pushed: ");
                scanf("%d", &item);
                StackPush(s, item);
            break;

            case 2:
                item = StackPop(s);
                printf("\nThe popped element is %d", item);
            break;

            case 3:
                printf("\nEnter element to be searched: ");
                scanf("%d", &item);
                StackSearch(s, item);
            break;

            case 4:
                Display(s);
            break;

            case 5:
                item=StackTop(s);
                printf("\nThe last inserted element is %d",item);
            break;

            case 6:
                item = StackSize(s);
                printf("\nThe size of stack is %d", item + 1);
            break;

            case 7:
                StackDestroy(s);
            break;

            case 8:
                exit(0);
        }
    } while(1);


    return 0;
}

结果是有4个不同版本光标的tiff,范围从20x24像素(非视网膜默认值)到200x240像素。使用Preview.app,您可以获取每个单独的大小并复制/粘贴到新文档中,将每个文档保存为png。

或者只是抓住我之前准备的一个:https://dl.dropboxusercontent.com/u/147461/mac-cursor/mac-cursor.zip