Skip to content
GitLab
Explorer
Connexion
Navigation principale
Rechercher ou aller à…
Projet
lektor
Gestion
Activité
Membres
Labels
Programmation
Tickets
Tableaux des tickets
Jalons
Code
Requêtes de fusion
Dépôt
Branches
Validations
Étiquettes
Graphe du dépôt
Comparer les révisions
Compilation
Pipelines
Jobs
Planifications de pipeline
Artéfacts
Aide
Aide
Support
Documentation de GitLab
Comparer les forfaits GitLab
Forum de la communauté GitLab
Contribuer à GitLab
Donner votre avis
Raccourcis clavier
?
Extraits de code
Groupes
Projets
Afficher davantage de fils d'Ariane
Kubat
lektor
Validations
5290dd15
Vérifiée
Valider
5290dd15
rédigé
25 janv. 2021
par
Kubat
Parcourir les fichiers
Options
Téléchargements
Correctifs
Plain Diff
MISC: Add window icon
parent
5b8db72c
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
Modifications
4
Afficher les modifications d'espaces
En ligne
Côte à côte
Affichage de
4 fichiers modifiés
inc/lektor/icon.xpm
+47
-0
47 ajouts, 0 suppression
inc/lektor/icon.xpm
src/Makefile.am
+2
-2
2 ajouts, 2 suppressions
src/Makefile.am
src/Makefile.in
+2
-2
2 ajouts, 2 suppressions
src/Makefile.in
src/module/module_sdl2.c
+12
-0
12 ajouts, 0 suppression
src/module/module_sdl2.c
avec
63 ajouts
et
4 suppressions
inc/lektor/icon.xpm
0 → 100644
+
47
−
0
Voir le fichier @
5290dd15
/* XPM */
static char *icon[] = {
/* columns rows colors chars-per-pixel */
"32 32 9 1 ",
" c #0E001D",
". c #2A0035",
"X c #4F0945",
"o c #86156B",
"O c #943E7D",
"+ c #B46A9A",
"@ c #DB7BA3",
"# c #F3CDC6",
"$ c white",
/* pixels */
"X...X. XXXX O..XXX.O.XX....XXX ",
"X. ...O.XXXX O...XXXO..X...XXXX ",
".. .. O.X... O..XXXXO .X. .XXXX ",
".. .. O.X... O...XX. ... ..XXX ",
".. .. O.... O...... ... ..XXX ",
".. .. .... O...... O... .XXX ",
".. .. O.... O...... ... .XXX ",
".. .. O.... O...... O... ..XX ",
".. .. O... O...... O .. ..XX ",
".. OOOOO O OOOOOOO . ..X. ",
".. @@@@@@@@ . .... ",
".. ####### ...... ",
".. $ . ###### ...... ",
".. $$$X ###### $$$. ...... ",
". $$ X #######$$ X ...... ",
". O $ X #######$$ X ...... ",
". O#$$Xoo#######$$$Xoo@...... ",
". O###################@.......",
". ################$$#@.......",
". @##################@.......",
". @######@###########@.......",
". #################@ .......",
". @################@ .......",
". ################@ .......",
". @#####++++@#####@ .......",
". @##############. .......",
". @############# .......",
". . ##########@ . .......",
". . @######@ OO. .......",
". ... @@@@ OOOO.........",
". ... OOOOOO.........",
". ... . OOOOOO........."
};
Ce diff est replié.
Cliquez pour l'agrandir.
src/Makefile.am
+
2
−
2
Voir le fichier @
5290dd15
...
@@ -25,7 +25,7 @@ endif
...
@@ -25,7 +25,7 @@ endif
liblktmodsdl_la_SOURCES
=
module/module_sdl2.c module/mpv.c
liblktmodsdl_la_SOURCES
=
module/module_sdl2.c module/mpv.c
liblktmodsdl_la_CFLAGS
=
-fPIC
`
sdl2-config
--cflags
`
liblktmodsdl_la_CFLAGS
=
-fPIC
`
sdl2-config
--cflags
`
liblktmodsdl_la_LDFLAGS
=
-avoid-version
-pthread
-lmpv
liblktmodsdl_la_LDFLAGS
=
-avoid-version
-pthread
-lmpv
liblktmodsdl_la_LIBADD
=
-lSDL2
-lmpv
liblktmodsdl_la_LIBADD
=
-lSDL2
-lSDL2_image
-lmpv
if
LKT_STATIC_MODULE
if
LKT_STATIC_MODULE
liblktmodsdl_la_LDFLAGS
+=
-static
liblktmodsdl_la_LDFLAGS
+=
-static
else
else
...
@@ -58,7 +58,7 @@ else
...
@@ -58,7 +58,7 @@ else
liblektor_la_LDFLAGS
+=
-shared
liblektor_la_LDFLAGS
+=
-shared
endif
endif
if
LKT_STATIC_MODULE
if
LKT_STATIC_MODULE
liblektor_la_LDFLAGS
+=
-lSDL2
-lmpv
liblektor_la_LDFLAGS
+=
-lSDL2
-lSDL2_image
-lmpv
liblektor_la_LIBADD
=
liblktmodsdl.la liblktmodrepo.la
liblektor_la_LIBADD
=
liblktmodsdl.la liblktmodrepo.la
endif
endif
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/Makefile.in
+
2
−
2
Voir le fichier @
5290dd15
...
@@ -95,7 +95,7 @@ host_triplet = @host@
...
@@ -95,7 +95,7 @@ host_triplet = @host@
@LKT_STATIC_MODULE_FALSE@
am__append_4
=
-shared
@LKT_STATIC_MODULE_FALSE@
am__append_4
=
-shared
@LKT_STATIC_LIB_TRUE@
am__append_5
=
-static
@LKT_STATIC_LIB_TRUE@
am__append_5
=
-static
@LKT_STATIC_LIB_FALSE@
am__append_6
=
-shared
@LKT_STATIC_LIB_FALSE@
am__append_6
=
-shared
@LKT_STATIC_MODULE_TRUE@
am__append_7
=
-lSDL2
-lmpv
@LKT_STATIC_MODULE_TRUE@
am__append_7
=
-lSDL2
-lSDL2_image
-lmpv
# TODO pour le Kubat du futur: c'est pas beau, trouver un truc pour que ça se fasse tout seul
# TODO pour le Kubat du futur: c'est pas beau, trouver un truc pour que ça se fasse tout seul
@LKT_STATIC_MODULE_TRUE@
am__append_8
=
module/thread.c
@LKT_STATIC_MODULE_TRUE@
am__append_8
=
module/thread.c
...
@@ -461,7 +461,7 @@ liblktmodsdl_la_SOURCES = module/module_sdl2.c module/mpv.c
...
@@ -461,7 +461,7 @@ liblktmodsdl_la_SOURCES = module/module_sdl2.c module/mpv.c
liblktmodsdl_la_CFLAGS
=
-fPIC
`
sdl2-config
--cflags
`
liblktmodsdl_la_CFLAGS
=
-fPIC
`
sdl2-config
--cflags
`
liblktmodsdl_la_LDFLAGS
=
-avoid-version
-pthread
-lmpv
\
liblktmodsdl_la_LDFLAGS
=
-avoid-version
-pthread
-lmpv
\
$(
am__append_3
)
$(
am__append_4
)
$(
am__append_3
)
$(
am__append_4
)
liblktmodsdl_la_LIBADD
=
-lSDL2
-lmpv
liblktmodsdl_la_LIBADD
=
-lSDL2
-lSDL2_image
-lmpv
# Base sources
# Base sources
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
src/module/module_sdl2.c
+
12
−
0
Voir le fichier @
5290dd15
...
@@ -6,6 +6,8 @@
...
@@ -6,6 +6,8 @@
#include
"mpv.h"
#include
"mpv.h"
#include
"thread.h"
#include
"thread.h"
#include
<lektor/icon.xpm>
#include
<sqlite3.h>
#include
<sqlite3.h>
#include
<sched.h>
#include
<sched.h>
#include
<string.h>
#include
<string.h>
...
@@ -14,6 +16,7 @@
...
@@ -14,6 +16,7 @@
#include
<stdio.h>
#include
<stdio.h>
#include
<stdarg.h>
#include
<stdarg.h>
#include
<SDL.h>
#include
<SDL.h>
#include
<SDL_image.h>
#include
<mpv/render_gl.h>
#include
<mpv/render_gl.h>
#include
<mpv/client.h>
#include
<mpv/client.h>
...
@@ -427,6 +430,15 @@ module_sdl2_new(struct module_sdl2_window **win, struct queue *queue,
...
@@ -427,6 +430,15 @@ module_sdl2_new(struct module_sdl2_window **win, struct queue *queue,
arg
->
args
=
*
win
;
arg
->
args
=
*
win
;
RETURN_IF
(
poller_new
(
&
(
*
win
)
->
self
,
sdl_thread__
,
arg
),
RETURN_IF
(
poller_new
(
&
(
*
win
)
->
self
,
sdl_thread__
,
arg
),
"Failed to launch the SDL thread"
,
false
);
"Failed to launch the SDL thread"
,
false
);
/* Set window icon */
SDL_Surface
*
window_icon
=
IMG_ReadXPMFromArray
(
icon
);
if
(
NULL
==
window_icon
)
{
LOG_ERROR
(
"WINDOW"
,
"Failed to load xpm icon: %s"
,
IMG_GetError
());
}
else
{
SDL_SetWindowIcon
((
SDL_Window
*
)
(
*
win
)
->
window
,
window_icon
);
SDL_FreeSurface
(
window_icon
);
}
}
else
}
else
LOG_DEBUG
(
"WINDOW"
,
"SDL window already created"
);
LOG_DEBUG
(
"WINDOW"
,
"SDL window already created"
);
...
...
Ce diff est replié.
Cliquez pour l'agrandir.
Aperçu
0%
Chargement en cours
Veuillez réessayer
ou
joindre un nouveau fichier
.
Annuler
You are about to add
0
people
to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Enregistrer le commentaire
Annuler
Veuillez vous
inscrire
ou vous
se connecter
pour commenter